aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2022-05-01 16:45:03 -0300
committerEuAndreh <eu@euandre.org>2022-05-01 16:45:03 -0300
commit9de191259c6572b10b6a24b8eb78fe3b9c9b3b96 (patch)
tree531db754f49ee99ffe84b639fe1d5398369ee7ea /bin
parentbin/tmp: Indent documentation text (diff)
downloadeuandre.org-9de191259c6572b10b6a24b8eb78fe3b9c9b3b96.tar.gz
euandre.org-9de191259c6572b10b6a24b8eb78fe3b9c9b3b96.tar.xz
bin/tmp: Remove trailing "/" from $REMOTE_TMP
Diffstat (limited to 'bin')
-rwxr-xr-xbin/tmp7
1 files 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"