aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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"