move old files to old directory

Signed-off-by: Václav Valíček <valicek1994@gmail.com>
This commit is contained in:
2022-05-04 09:46:41 +02:00
parent 3d12f83d26
commit b536c883de
28 changed files with 0 additions and 0 deletions

View File

@@ -0,0 +1,33 @@
#!/bin/bash
function detectorTryInit(){
# repo dir
dir=$1
history=$DET_DIR/detectorExecuted
if ! [ -f $history ]
then
echo "Initializing detector cache"
# initialize seed
git --git-dir $dir log --all --format="%H" > $history
fi
}
function detectorCheckCommit(){
sha=$1
history=$DET_DIR/detectorExecuted
[ -f $history ] || touch $history
if grep -q $sha $history
then
return 1
else
return 0
fi
}
function detectorSaveCommit(){
sha=$1
history=$DET_DIR/detectorExecuted
echo $sha >> $history
}