dont update if no version url

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

20
rc
View File

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