summarylogtreecommitdiffstats
path: root/autoup.bash
diff options
context:
space:
mode:
Diffstat (limited to 'autoup.bash')
-rwxr-xr-xautoup.bash8
1 files changed, 8 insertions, 0 deletions
diff --git a/autoup.bash b/autoup.bash
index 26f26f64c04a..c362c4b8de75 100755
--- a/autoup.bash
+++ b/autoup.bash
@@ -5,24 +5,32 @@ if [ -z "$1" ]; then
fi
echo "Trying to auto-update this package to version ${1} ..."
+
+# Clean up
+rm -rf pkg src discover-*
+
+# Update the version in the PKGBUILD
sed -ri 's/pkgver=([0-9]+\.[0-9]+\.[0-9]+\.{0,1}[0-9]*)/pkgver='"${1}"'/' PKGBUILD
if [ "$?" -ne 0 ]; then
echo "Setting the version number in PKGBUILD failed."
exit 1
fi
+# Update the package sums in the PKGBUILD
updpkgsums
if [ "$?" -ne 0 ]; then
echo "Updating the checksums failed."
exit 1
fi
+# Update .SRCINFO
makepkg --printsrcinfo > .SRCINFO
if [ "$?" -ne 0 ]; then
echo "Recreating .SRCINFO failed."
exit 1
fi
+# Build & install the package
makepkg -si --noconfirm
if [ "$?" -ne 0 ]; then
echo "Building and installing the package failed."