aboutsummaryrefslogtreecommitdiff
path: root/ptmp
diff options
context:
space:
mode:
Diffstat (limited to 'ptmp')
-rwxr-xr-xptmp10
1 files changed, 7 insertions, 3 deletions
diff --git a/ptmp b/ptmp
index 125d8dc..e2446c5 100755
--- a/ptmp
+++ b/ptmp
@@ -28,11 +28,15 @@ do
done
shift `expr $OPTIND - 1`
-PAD=$(md5sum $1 | cut -f1 -d' ')
-BASE=$(basename $1)
+FILE="$@"
+
+PAD=$(md5sum "${FILE}" | cut -f1 -d' ')
+BASE=$(basename "${FILE}")
DEST_NAME="${PAD}.${BASE}${OPT_SUFFIX}"
-scp $1 "${DEST_DIR}/${DEST_NAME}"
+echo "${DEST_NAME}"
+
+scp "${FILE}" "${DEST_DIR}/${DEST_NAME}"
echo "https://rak.ac/~tmp/${DEST_NAME}"