second commit
This commit is contained in:
Executable
+10
@@ -0,0 +1,10 @@
|
||||
#!/bin/bash
|
||||
|
||||
SOURCE=$(realpath "$1")
|
||||
DEST=$(realpath "$2")
|
||||
|
||||
[ ! -d "$SOURCE" ] && echo "SOURCE FOLDER <$SOURCE> not reachable!" && exit 1
|
||||
[ ! -d "$DEST" ] && echo "DESTINATION FOLDER missing!" && exit 2
|
||||
[ "$SOURCE" == "$DEST" ] && echo "SOURCE and DESTINATION overriden!" && exit 3
|
||||
|
||||
rsync -a --no-inc-recursive --info=progress2 --remove-source-files "$SOURCE" "$DEST" && find "$SOURCE" -type d -empty -delete
|
||||
Reference in New Issue
Block a user