From 75bd599a337f0ac11e7cbf0a369319d8812a88d8 Mon Sep 17 00:00:00 2001 From: 3wc <3wc.git@doesthisthing.work> Date: Sun, 18 Apr 2021 03:39:45 +0200 Subject: [PATCH] Update abra for new apps URL --- abra | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/abra b/abra index 06d149d..79052cc 100755 --- a/abra +++ b/abra @@ -1,6 +1,7 @@ #!/usr/bin/env bash GIT_URL="https://git.autonomic.zone/coop-cloud/" +ABRA_APPS_URL="https://apps.coopcloud.tech" ABRA_DIR="${ABRA_DIR:-$HOME/.abra}" ABRA_VERSION="0.7.2" ABRA_BACKUP_DIR="${ABRA_BACKUP_DIR:-$ABRA_DIR/backups}" @@ -484,10 +485,8 @@ require_apps_json() { return fi - apps_url="https://abra-apps.cloud.autonomic.zone" - if [ -f "$ABRA_APPS_JSON" ]; then - modified=$(curl --silent --head $apps_url | \ + modified=$(curl --silent --head "$ABRA_APPS_URL" | \ awk '/^Last-Modified/{print $0}' | \ sed 's/^Last-Modified: //') remote_ctime=$(date --date="$modified" +%s) @@ -495,13 +494,13 @@ require_apps_json() { if [ "$local_ctime" -lt "$remote_ctime" ]; then info "Downloading new apps.json" - wget -qO "$ABRA_APPS_JSON" $apps_url + wget -qO "$ABRA_APPS_JSON" "$ABRA_APPS_URL" else debug "No apps.json update needed" fi else info "Downloading apps.json" - wget -qO "$ABRA_APPS_JSON" $apps_url + wget -qO "$ABRA_APPS_JSON" "$ABRA_APPS_URL" fi }