aboutsummarylogtreecommitdiffstats
path: root/update
diff options
context:
space:
mode:
authorBen Alex2020-12-07 13:12:46 +1100
committerBen Alex2020-12-07 13:12:46 +1100
commit7735cdefccae9e4ad2969b9334f9843ff76eacd9 (patch)
tree56a554abea2cb0f30fe53fefab8da97d39784c79 /update
parent966053f102cbb5f076c5f5fc2b20da874876f8cd (diff)
downloadaur-7735cdefccae9e4ad2969b9334f9843ff76eacd9.tar.gz
Refactor tws_ scripts and change to ZST archive format
Diffstat (limited to 'update')
-rwxr-xr-xupdate12
1 files changed, 6 insertions, 6 deletions
diff --git a/update b/update
index e9c8ffad10d7..9ed1ee0a6252 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