summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorVedant K2021-06-17 17:40:35 +0530
committerVedant K2021-06-17 17:40:35 +0530
commit2d6b961d35d885d3fa27215cf2c1ac41afcf4c87 (patch)
tree2b410db9d0b2e1da81be4a35b02534bd93f8aa45
parentd573c4185e3f7b7025248e7eec619e64dcb4bcfd (diff)
downloadaur-2d6b961d35d885d3fa27215cf2c1ac41afcf4c87.tar.gz
tweaks to update-version script
-rwxr-xr-xupdate-version22
1 files changed, 15 insertions, 7 deletions
diff --git a/update-version b/update-version
index 6adc305fc7b1..eece60c71f89 100755
--- a/update-version
+++ b/update-version
@@ -168,15 +168,23 @@ else
fi
# Run makepkg
printb "==> Running makepkg..."
-BUILDDIR="$TEMP_DIR" makepkg -p "$PKGBUILD_PATH"
+BUILDDIR="$TEMP_DIR" makepkg -fp "$PKGBUILD_PATH"
printg "==> makepkg successful!"
# Pushing to git
printm "==> Push to AUR"
# Run git add, commit, push
-git add $GIT_FILES
-git commit -m "$GIT_MESSAGE"
-git push
-
-# We're done!
-printg "==> Succesfully updated package!" \ No newline at end of file
+printb "==> Files to commit: $GIT_FILES"
+printb "==> Commit message: $GIT_MESSAGE"
+# Ask for confirmation
+read -p $'\e[1;33m ==> Push to AUR?\e[0m [\e[1;32my\e[0m/\e[1;31mN\e[0m] ' -n 1 -r
+if [[ $REPLY =~ ^[Yy]$ ]]; then
+ printb "==> Pushing files..."
+ git add $GIT_FILES
+ git commit -m "$GIT_MESSAGE"
+ git push
+ # We're done!
+ printg "==> Succesfully updated package!"
+else
+ printr "ERR Aborting push; cancelled by user"
+fi \ No newline at end of file