From 1acd0fd45ad4d66e9dc58d8f3c56faba9c133d5e Mon Sep 17 00:00:00 2001 From: SinTan1729 Date: Sun, 30 Jun 2024 21:11:11 -0500 Subject: [PATCH] fix: Use correct env var --- update-aur-lure.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) mode change 100644 => 100755 update-aur-lure.sh diff --git a/update-aur-lure.sh b/update-aur-lure.sh old mode 100644 new mode 100755 index 9579fba..cb1afd9 --- a/update-aur-lure.sh +++ b/update-aur-lure.sh @@ -11,13 +11,13 @@ if [ "$#" -ne 2 ]; then exit -1 fi -# xdg-user-dirs is used to get the directory for the repos -GIT_DIR=$(xdg-user-dir DOCUMENTS)/git +# GITDIR env variable should be set for this to work +[ -z $GITDIR ] && exit -1 VERS="$2" # Do the updates for AUR echo "Updating AUR..." -cd "$GIT_DIR/AUR" +cd "$GITDIR/AUR" [ -d "$1" ] && PKG="$1" || PKG="$1-bin" cd "$PKG" @@ -33,7 +33,7 @@ git push # Update the GitHub backup repo as well echo "Updating AUR backup repo..." -cd "$GIT_DIR/AUR Mirror GitHub/$PKG" +cd "$GITDIR/AUR Mirror GitHub/$PKG" sed -i -E "s/pkgver=[0-9\.]+/pkgver=$VERS/" PKGBUILD git add . git commit -m "Bumped $PKG version to $VERS" @@ -41,7 +41,7 @@ git push # Do the updates for LURE echo "Updating LURE repo..." -cd "$GIT_DIR/lure-repo" +cd "$GITDIR/lure-repo" [ -d "$1" ] && PKG="$1" || PKG="$1-bin" cd "$PKG" sed -i -E "s/version=[0-9\.]+/version=$VERS/" lure.sh