Removed obsolette code

Signed-off-by: Václav Valíček <valicek1994@gmail.com>
This commit is contained in:
Václav Valíček 2022-07-26 02:52:19 +02:00
parent 9eece76ad9
commit f78cfb8eee
Signed by: valicek
GPG Key ID: FF05BDCA0C73BB31

View File

@ -1,42 +0,0 @@
#!/bin/bash
source $(dirname $(realpath $0))/config
function getRepoUniq(){
base=$(basename $1 .git)
rest=$(dirname $1)
# .git (working repo)
if [ "$base" == ".git" ]
then
base=$(basename $rest)
rest=$(dirname $rest)
fi
# extract username - or path
namespace=$(basename $rest)
# solve ssh domain:namespace/repo.git
if [[ "$namespace" == *:* ]]
then
namespace=$(echo $namespace | cut -d':' -f2)
fi
csum=$(echo $1 | cksum | cut -d' ' -f1)
echo ${namespace}_${base}_${csum}
}
function getRepoPath(){
uniq=$(getRepoUniq $1)
echo $cfgMirrorPath/$uniq.git
}
function getRepoCache(){
uniq=$(getRepoUniq $1)
echo $cfgCachePath/$uniq
}
# it the script is not sourced
if [[ ! "${BASH_SOURCE[0]}" != "${0}" ]]
then
getRepoPath $1
fi