repo-cloner/old/checker/detector-lib-cfg
Václav Valíček b536c883de
move old files to old directory
Signed-off-by: Václav Valíček <valicek1994@gmail.com>
2022-05-04 09:46:41 +02:00

30 lines
493 B
Bash

#!/bin/bash
# check if varriable is set
[ -n "$CONFIG_DIR" ] || die "ConfigDir is not set - exit!"
function detectorRunCapable(){
if [ -f $CONFIG_DIR/detector.cfg ]
then
return 0
else
return 1
fi
}
function detectorLoadConfig(){
# load config
source $CONFIG_DIR/detector.cfg
# create cache dirs
DET_DIR=$CCLONE_CACHE/detector
DET_TAGS=$DET_DIR/tags
DET_BRANCHES=$DET_DIR/branches
[ -d $DET_TAGS ] || mkdir -p $DET_TAGS
[ -d $DET_BRANCHES ] || mkdir -p $DET_BRANCHES
}