Testing git runner
This commit is contained in:
29
checker/detector-lib-cfg
Normal file
29
checker/detector-lib-cfg
Normal file
@@ -0,0 +1,29 @@
|
||||
#!/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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user