Update 2025-01-02 23:53 OpenBSD/amd64-t14
This commit is contained in:
11
.bin/upload
11
.bin/upload
@@ -118,21 +118,24 @@ fi
|
||||
# HANDLE CASE: rename remote file
|
||||
if [ -n "$_mv" ]
|
||||
then
|
||||
_arg1=$(basename "$1")
|
||||
_arg2=$(basename "$2")
|
||||
ssh $_sshhost \
|
||||
"cd $_rpath/ \
|
||||
&& mv -v \"$1\" \"$2\""
|
||||
echo "$2" | remote_list_print
|
||||
&& mv -v \"$_arg1\" \"$_arg2\""
|
||||
echo "$_arg2" | remote_list_print
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# HANDLE CASE: rename the last uploaded remote file
|
||||
if [ -n "$_mvlast" ]
|
||||
then
|
||||
_arg1=$(basename "$1")
|
||||
lastfile="$(remote_list | tail -1)"
|
||||
ssh $_sshhost \
|
||||
"cd $_rpath/ \
|
||||
&& mv -v \"$lastfile\" \"$1\""
|
||||
echo "$1" | remote_list_print
|
||||
&& mv -v \"$lastfile\" \"$_arg1\""
|
||||
echo "$_arg1" | remote_list_print
|
||||
exit 0
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user