diff --git a/rootfs/tar1090-install.sh b/rootfs/tar1090-install.sh index fd6e990..b2b6f26 100755 --- a/rootfs/tar1090-install.sh +++ b/rootfs/tar1090-install.sh @@ -69,8 +69,8 @@ function getGIT() { rm -rf "$tmp" "$tmp.folder"; popd > /dev/null; return 1; } -DB_VERSION_NEW=$(curl --connect-timeout 2 --silent --show-error "https://raw.githubusercontent.com/wiedehopf/tar1090-db/master/version") -if [[ "$(cat "$gpath/git-db/version" 2>/dev/null)" != "$DB_VERSION_NEW" ]]; then +if DB_VERSION_NEW=$(curl --connect-timeout 2 --silent --show-error "https://raw.githubusercontent.com/wiedehopf/tar1090-db/master/version") \ + && [[ "$(cat "$gpath/git-db/version" 2>/dev/null)" != "$DB_VERSION_NEW" ]]; then getGIT "$db_repo" "master" "$gpath/git-db" || true fi @@ -95,8 +95,8 @@ if [[ "$1" == "test" ]] || [[ -n "$git_source" ]]; then cd "$gpath/git" TAR_VERSION="$(cat version)_dirty" else - VERSION_NEW=$(curl --connect-timeout 2 --silent --show-error "https://raw.githubusercontent.com/wiedehopf/tar1090/master/version") - if [[ "$(cat "$gpath/git/version" 2>/dev/null)" != "$VERSION_NEW" ]]; then + if VERSION_NEW=$(curl --connect-timeout 2 --silent --show-error "https://raw.githubusercontent.com/wiedehopf/tar1090/master/version") \ + && [[ "$(cat "$gpath/git/version" 2>/dev/null)" != "$VERSION_NEW" ]]; then if ! getGIT "$repo" "master" "$gpath/git"; then echo "Unable to download files, exiting! (Maybe try again?)" exit 1