From f78cfb8eeea7ee513fa7f40c3a789cfa5f7c8163 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=A1clav=20Val=C3=AD=C4=8Dek?= Date: Tue, 26 Jul 2022 02:52:19 +0200 Subject: [PATCH] Removed obsolette code MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Václav Valíček --- old/src/gen-mirror-path | 42 ----------------------------------------- 1 file changed, 42 deletions(-) delete mode 100755 old/src/gen-mirror-path diff --git a/old/src/gen-mirror-path b/old/src/gen-mirror-path deleted file mode 100755 index 7ef1f11..0000000 --- a/old/src/gen-mirror-path +++ /dev/null @@ -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 - -