You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
963 B

#!/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