From 9de191259c6572b10b6a24b8eb78fe3b9c9b3b96 Mon Sep 17 00:00:00 2001 From: EuAndreh Date: Sun, 1 May 2022 16:45:03 -0300 Subject: bin/tmp: Remove trailing "/" from $REMOTE_TMP --- bin/tmp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/bin/tmp b/bin/tmp index d9c5952..4658f4a 100755 --- a/bin/tmp +++ b/bin/tmp @@ -35,11 +35,11 @@ for flag in "$@"; do done TLD='euandre.org' -REMOTE_TMP='/home/user-data/www/default/tmp/' +REMOTE_TMP='/home/user-data/www/default/tmp' while getopts 'dh' flag; do case "$flag" in d) - printf 'Deleting %s/:%s...\n' "$TLD" "$REMOTE_TMP" >&2 + printf 'Deleting %s:%s...\n' "$TLD" "$REMOTE_TMP/" >&2 ssh "$TLD" rm -rf "$REMOTE_TMP" exit ;; @@ -62,8 +62,7 @@ fi for f in "$@"; do FILENAME="$(basename "$f")" - # shellcheck disable=2029 - ssh "$TLD" "mkdir -p $REMOTE_TMP && cat > $REMOTE_TMP$FILENAME" < "$f" + ssh "$TLD" "mkdir -p $REMOTE_TMP && cat > $REMOTE_TMP/$FILENAME" < "$f" LINK="$(printf 'https://%s/tmp/%s' "$TLD" "$FILENAME")" open "$LINK" -- cgit v1.2.3