Skip to content

Commit

Permalink
tar1090-update: don't fail without internet (#250)
Browse files Browse the repository at this point in the history
instead install the version from the persistent git data if it exists
  • Loading branch information
wiedehopf authored Jan 6, 2025
1 parent 535e05a commit 6e025e5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions rootfs/tar1090-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
Expand Down

0 comments on commit 6e025e5

Please sign in to comment.