aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRyan Kavanagh <rak@rak.ac>2020-09-11 12:04:20 -0400
committerRyan Kavanagh <rak@rak.ac>2020-09-11 12:04:20 -0400
commit2aee2d37905b27fba9cc93db65e7deb247e895bd (patch)
tree33ff3e7f538865b2659ba9af12cefeab81730cec
parentBetter error handling, and a verbose option (diff)
ptmp: handle files in other directories
Diffstat (limited to '')
-rwxr-xr-xptmp3
1 files changed, 2 insertions, 1 deletions
diff --git a/ptmp b/ptmp
index f54633f..125d8dc 100755
--- a/ptmp
+++ b/ptmp
@@ -29,8 +29,9 @@ done
shift `expr $OPTIND - 1`
PAD=$(md5sum $1 | cut -f1 -d' ')
+BASE=$(basename $1)
-DEST_NAME="${PAD}.$1${OPT_SUFFIX}"
+DEST_NAME="${PAD}.${BASE}${OPT_SUFFIX}"
scp $1 "${DEST_DIR}/${DEST_NAME}"