rmv fixing
This commit is contained in:
@@ -192,9 +192,11 @@ function rmv () {
|
|||||||
#mv with rsync
|
#mv with rsync
|
||||||
local sources
|
local sources
|
||||||
sources=()
|
sources=()
|
||||||
|
# remove / from ends, if target is an existing folder
|
||||||
for (( i=1; i<=$(($#-1)); i++ ))
|
for (( i=1; i<=$(($#-1)); i++ ))
|
||||||
do if [ -d "${!i}" ]
|
do if [ -d "${@: -1}" ]
|
||||||
then sources+=("${!i%/}")
|
then sources+=("${!i%/}")
|
||||||
|
else sources+=("${!i}")
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
rsync -vaP --remove-source-files "${sources[@]}" "${@: -1}"
|
rsync -vaP --remove-source-files "${sources[@]}" "${@: -1}"
|
||||||
|
|||||||
Reference in New Issue
Block a user