summarylogtreecommitdiffstats
path: root/update
diff options
context:
space:
mode:
Diffstat (limited to 'update')
-rwxr-xr-xupdate12
1 files changed, 6 insertions, 6 deletions
diff --git a/update b/update
index e9c8ffad10d..9ed1ee0a625 100755
--- a/update
+++ b/update
@@ -5,8 +5,8 @@
# 1 = PKGBUILD has been updated
# 2 = Error
-tws_check_update &> /dev/null
-if [ "$?" -eq 2 ]; then echo "tws_check_update failed"; exit 2; fi
+./tws_check_update
+if [ "$?" -ne 0 ]; then echo "tws_check_update failed"; exit 2; fi
PRG="$0"
@@ -25,25 +25,25 @@ if [ ! -e "$SCRIPT_HOME/PKGBUILD" ] ; then
echo "$SCRIPT_HOME/PKGBUILD missing"
exit 2
fi
-if [ ! -e "$HOME/.tws_scripts/tws-latest-standalone-linux-x64.sh" ] ; then
+if [ ! -e "$HOME/.tws_scripts/version.txt" ] ; then
echo "tws_check_update does not appear to have run"
exit 2
fi
-VER="$(readlink $HOME/.tws_scripts/tws-latest-standalone-linux-x64.sh | sed 's/.*-//g' | sed 's/.sh//g')"
+VER="$(cat $HOME/.tws_scripts/version.txt)"
grep -q "pkgver=${VER}" $SCRIPT_HOME/PKGBUILD
if [ "$?" -eq 0 ]; then
exit 0
else
cd $SCRIPT_HOME
- rm -rf *.jar *.xz *.gz tws-latest-standalone-*.sh pkg src
+ rm -rf *.jar *.zst *.gz tws-latest-standalone-*.sh pkg src
sed -i "s/pkgver=.*/pkgver=${VER}/" PKGBUILD
sed -i "s/pkgrel=.*/pkgrel=1/" PKGBUILD
# Next line from https://bugs.archlinux.org/task/15051
{ rm PKGBUILD; awk '$0 ~ /^md5sums/ {i = 1; system("makepkg -g 2>/dev/null")}; !i {print}; $0 ~ /\)/ {i = 0}' > PKGBUILD; } < PKGBUILD
makepkg
- if ! ls *.xz &> /dev/null ; then
+ if ! ls *.zst &> /dev/null ; then
echo "Package creation failure"
exit 2
fi