summarylogtreecommitdiffstats
path: root/tws_check_update
diff options
context:
space:
mode:
authorBen Alex2020-12-24 13:53:39 +1100
committerBen Alex2020-12-24 13:59:01 +1100
commite3ce17a60511c696ded3f86a870e525e70a59bd0 (patch)
tree4b1da6ecc6b25f3495216086878bd3cf278d3bd8 /tws_check_update
parent8ff9558ff8729551b451c3cc4d4845031c6c4c8c (diff)
downloadaur-e3ce17a60511c696ded3f86a870e525e70a59bd0.tar.gz
Better handle line buffering in tws_get_version
Diffstat (limited to 'tws_check_update')
-rwxr-xr-xtws_check_update11
1 files changed, 8 insertions, 3 deletions
diff --git a/tws_check_update b/tws_check_update
index b23decae97d..6ee5a8ad8ad 100755
--- a/tws_check_update
+++ b/tws_check_update
@@ -25,15 +25,20 @@ echo "Latest version after wget has md5sum $MD5_NEW"
if [ "$MD5_OLD" == "$MD5_NEW" ]; then
echo "File has not changed"
- exit 0
+ if [ -e "${DOWNLOAD_DIR}/version.txt" ] ; then
+ echo "version.txt found so no further work required"
+ exit 0
+ fi
fi
-echo "File has been updated; extracting version number by executing Java"
+echo "Extracting version number"
DST="$(./tws_get_version "${FILE_CUR}" || echo unknown)"
echo "Version is $DST"
if [[ $DST == *"unknown"* ]]; then
- echo "Error obtaining version by executing $FILE_MIRROR"
+ echo "Error obtaining version from $FILE_MIRROR"
+ echo "Removing ${DOWNLOAD_DIR}/version.txt"
+ rm -f ${DOWNLOAD_DIR}/version.txt
exit 2
fi