dont update if no version url

This commit is contained in:
Q
2025-11-05 17:32:27 +02:00
parent aab711c313
commit b8196667f6

18
rc
View File

@@ -38,14 +38,16 @@ function _q-tools-update-binary {
local remote_version local remote_version
current_version=$( cat "$QTOOLSPATH"/.version ) current_version=$( cat "$QTOOLSPATH"/.version )
remote_version=$( curl -f -s -L https://six9.net/software/q-tools/current.txt ) remote_version=$( curl -f -s -L https://six9.net/software/q-tools/current.txt )
if [[ "$remote_version" != "$current_version" ]]; then if [[ -n "$remote_version" ]]; then
set -u if [[ "$remote_version" != "$current_version" ]]; then
echo "Update $current_version => $remote_version" set -u
mkdir -p "$QTOOLSPATH" echo "Update $current_version => $remote_version"
find "$QTOOLSPATH" -maxdepth 1 -mindepth 1 -type d -exec rm -r \{\} \; mkdir -p "$QTOOLSPATH"
curl -L -f -s https://six9.net/software/q-tools/current.tar.gz | \ find "$QTOOLSPATH" -maxdepth 1 -mindepth 1 -type d -exec rm -r \{\} \;
tar xz -C "$QTOOLSPATH" curl -L -f -s https://six9.net/software/q-tools/current.tar.gz | \
set +u tar xz -C "$QTOOLSPATH"
set +u
fi
fi fi
popd > /dev/null popd > /dev/null
_q-tools-reload _q-tools-reload