diff options
author | EuAndreh <eu@euandre.org> | 2022-05-01 16:45:03 -0300 |
---|---|---|
committer | EuAndreh <eu@euandre.org> | 2022-05-01 16:45:03 -0300 |
commit | 9de191259c6572b10b6a24b8eb78fe3b9c9b3b96 (patch) | |
tree | 531db754f49ee99ffe84b639fe1d5398369ee7ea | |
parent | bin/tmp: Indent documentation text (diff) | |
download | euandre.org-9de191259c6572b10b6a24b8eb78fe3b9c9b3b96.tar.gz euandre.org-9de191259c6572b10b6a24b8eb78fe3b9c9b3b96.tar.xz |
bin/tmp: Remove trailing "/" from $REMOTE_TMP
Diffstat (limited to '')
-rwxr-xr-x | bin/tmp | 7 |
1 files changed, 3 insertions, 4 deletions
@@ -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" |