From e162208168603f4c4b2dad7c879784ffb88ff5e3 Mon Sep 17 00:00:00 2001 From: Benoit S Date: Sun, 29 Aug 2021 09:51:15 +0900 Subject: [PATCH] Apply shellcheck recommendations --- tootpaste.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tootpaste.sh b/tootpaste.sh index 23b3e60..ea02d5b 100644 --- a/tootpaste.sh +++ b/tootpaste.sh @@ -81,7 +81,7 @@ accounts_cull() { curl \ --silent \ --show-error \ - --max-time $INSTANCE_LAST_CHANCE_TIMEOUT \ + --max-time "$INSTANCE_LAST_CHANCE_TIMEOUT" \ https://"${instance}" \ || error=true if $error; then @@ -103,19 +103,19 @@ cache_recount(){ media_remove(){ - $DRY_RUN && $TOOTCTL media remove --days $MEDIA_REMOVE_DAYS --concurrency "$DB_POOL" --dry-run - $DRY_RUN || $TOOTCTL media remove --days $MEDIA_REMOVE_DAYS --concurrency "$DB_POOL" + $DRY_RUN && $TOOTCTL media remove --days "$MEDIA_REMOVE_DAYS" --concurrency "$DB_POOL" --dry-run + $DRY_RUN || $TOOTCTL media remove --days "$MEDIA_REMOVE_DAYS" --concurrency "$DB_POOL" $DRY_RUN && $TOOTCTL media remove-orphans --dry-run $DRY_RUN || $TOOTCTL media remove-orphans - $DRY_RUN && $TOOTCTL preview_cards remove --days $MEDIA_REMOVE_DAYS --concurrency "$DB_POOL" --dry-run - $DRY_RUN || $TOOTCTL preview_cards remove --days $CARDS_REMOVE_DAYS --concurrency "$DB_POOL" --link + $DRY_RUN && $TOOTCTL preview_cards remove --days "$MEDIA_REMOVE_DAYS" --concurrency "$DB_POOL" --dry-run + $DRY_RUN || $TOOTCTL preview_cards remove --days "$CARDS_REMOVE_DAYS" --concurrency "$DB_POOL" --link } statuses_remove(){ $DRY_RUN && echo 'Not removing old statuses in dry-run.' - $DRY_RUN || $TOOTCTL statuses remove --days $STATUSES_REMOVE_DAYS + $DRY_RUN || $TOOTCTL statuses remove --days "$STATUSES_REMOVE_DAYS" } $DO_ACCOUNTS_CULL && accounts_cull