30 lines
493 B
Bash
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
|
|
}
|
|
|
|
|