diff --git a/rc b/rc index 659dec8..c48b680 100755 --- a/rc +++ b/rc @@ -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() {