diff --git a/checkGitStatus.sh b/checkGitStatus.sh new file mode 100644 index 0000000..06dab3a --- /dev/null +++ b/checkGitStatus.sh @@ -0,0 +1,24 @@ +#!/bin/sh +git remote update +LOCAL=$(git rev-parse @) +REMOTE=$(git rev-parse) +BASE=$(git merge-base @) + +expireTimeNotifyOSD=10000 +currentId=1 + +if [ $LOCAL = $REMOTE ]; then + notify-send "$name is Up-to-date" -p -t $expireTimeNotifyOSD -r $currentId -i software-update-available > $tmpFile +elif [ $LOCAL = $BASE ]; then + notify-send "Start makepkg for $name" -p -t $expireTimeNotifyOSD -r $currentId -i software-update-available > $tmpFile + #cd ../../ + #fixes issue with makepkg ... git repo is not a clone of ... + #unset GIT_DIR + #makepkg + #repo-add /mnt/pi-usb-ssd/gind-repo/x86_64/gind-repo.db.tar.gz $name*.pkg.tar.zst + #mv $name*.pkg.tar.zst /mnt/pi-usb-ssd/gind-repo/x86_64/ +elif [ $REMOTE = $BASE ]; then + notify-send "$name needs push!" -p -t $expireTimeNotifyOSD -r $currentId -i software-update-available > $tmpFile +else + notify-send "$name git diverged!!" -p -t $expireTimeNotifyOSD -r $currentId -i software-update-available > $tmpFile +fi \ No newline at end of file