From 60400b64953a364a8b82291c51ddd612aec16f56 Mon Sep 17 00:00:00 2001 From: SinTan1729 Date: Tue, 22 Oct 2024 18:43:52 -0500 Subject: [PATCH] fix: Skip if AUR directory is missing --- update-aur-lure.sh | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/update-aur-lure.sh b/update-aur-lure.sh index cb1afd9..981b417 100644 --- a/update-aur-lure.sh +++ b/update-aur-lure.sh @@ -19,17 +19,19 @@ VERS="$2" echo "Updating AUR..." cd "$GITDIR/AUR" [ -d "$1" ] && PKG="$1" || PKG="$1-bin" - -cd "$PKG" -sed -i -E "s/pkgver=[0-9\.]+/pkgver=$VERS/" PKGBUILD -updpkgsums -makepkg --printsrcinfo >.SRCINFO - -# Remove downloaded files -ls | grep -v PKGBUILD | xargs -r -I {} rm "{}" -git add . -git commit -m "Bumped $PKG version to $VERS" -git push +if [ -d "$1" ]; then # Skip if the directory is missing + cd "$PKG" + sed -i -E "s/pkgver=[0-9\.]+/pkgver=$VERS/" PKGBUILD + updpkgsums + makepkg --printsrcinfo >.SRCINFO + # Remove downloaded files + ls | grep -v PKGBUILD | xargs -r -I {} rm "{}" + git add . + git commit -m "Bumped $PKG version to $VERS" + git push +else + echo "AUR directory is missing. Skipping this step." +fi # Update the GitHub backup repo as well echo "Updating AUR backup repo..."