From bf075047829096e4629b3e46c4f4639ee69ed351 Mon Sep 17 00:00:00 2001 From: Dor dicke Gind Date: Wed, 6 Jul 2022 19:01:21 +0200 Subject: [PATCH] add notify-send and use cp -n --- gind-repo-makepkg.sh | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/gind-repo-makepkg.sh b/gind-repo-makepkg.sh index 8773ac1..37cc873 100755 --- a/gind-repo-makepkg.sh +++ b/gind-repo-makepkg.sh @@ -1,18 +1,24 @@ #!/bin/sh +SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" &> /dev/null && pwd) +cd $SCRIPT_DIR -#git submodule update --recursive +git submodule update --recursive git submodule foreach ' - #creepy linux magic 2>&1 also pipes through stderr + #creepy linux magic 2>&1 also pipes through stderr, not needed anymore #isUpToDate=$(git fetch -v 2>&1 | grep "aktuell") #isUpToDate="" - if [ $name == "cairo-dock-git" ] - then - echo "Not up to date" - git pull - #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/ + expireTimeNotifyOSD=10000 + currentId=1 + tmpFile=/tmp/currentNotifyId + # gets the current notify id from our tmp file + if [ -s $tmpFile ]; then + currentId=$(cat $tmpFile) fi + + notify-send "Start makepkg for $name" -p -t $expireTimeNotifyOSD -r $currentId -i software-update-available > $tmpFile + #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 + cp -n $name*.pkg.tar.zst /mnt/pi-usb-ssd/gind-repo/x86_64/ ' \ No newline at end of file