summarylogtreecommitdiffstats
path: root/update_aur.sh
diff options
context:
space:
mode:
authorJan Metzger2019-04-01 20:48:04 +0200
committerJan Metzger2019-04-01 20:48:04 +0200
commit45a31fce7a75f0a92dbaa348baab747f9b19d10c (patch)
tree40ff6b56043295f5e4d9e3c5a6ad7f53ba99e561 /update_aur.sh
parentfb2fc0492ecaf50097036082d8479d0ad57e09b5 (diff)
downloadaur-45a31fce7a75f0a92dbaa348baab747f9b19d10c.tar.gz
Generate an example config file, inform user that config is not deleted, version bump
Diffstat (limited to 'update_aur.sh')
-rwxr-xr-xupdate_aur.sh2
1 files changed, 2 insertions, 0 deletions
diff --git a/update_aur.sh b/update_aur.sh
index dc2c76b2a03d..4e59c1d21dab 100755
--- a/update_aur.sh
+++ b/update_aur.sh
@@ -17,6 +17,7 @@ if [ ! -e "$BUILD_FILE" ]; then
fi
source "$BUILD_FILE"
+# Replace with latest commit to master branch
LATEST_COMMIT=$(git ls-remote "$url" master | cut -f 1)
if [ "$commit" = "$LATEST_COMMIT" ]; then
echo "Already on latest commit!"
@@ -27,6 +28,7 @@ sed -i "s%commit\=.*%commit\=('$LATEST_COMMIT')%" "$BUILD_FILE"
# Increment pkgrel on every "release"
sed -i "s%pkgrel\=.*%pkgrel\=$((pkgrel+1))%" "$BUILD_FILE"
+# Update package checksum
PKG_SHA=$(curl -L -s "$url/archive/$LATEST_COMMIT.tar.gz" | sha256sum | cut -d " " -f 1)
sed -i "s%sha256sums\=.*%sha256sums\=('$PKG_SHA')%" "$BUILD_FILE"