kebler.net
a21b588d08
switched to acl functions loaded via module load rysnc add ignore cache add chmod_dirs to helpers
13 lines
579 B
Bash
Executable file
13 lines
579 B
Bash
Executable file
#!/bin/bash
|
|
# simple copy using rsync. Preserves everything
|
|
# present working directory to supplied destination
|
|
module_load confirm
|
|
function cprs () {
|
|
[ $# -ne 2 ] && echo two directories source and destination need to be passed && return 1
|
|
[ ! -d "$1" ] && echo source: $1 is not a directory && return 1
|
|
[ ! -d "$2" ] && echo destination: $2 is not a directory && return 1
|
|
echo Command to run: rsync --progress -a -r -u "$1" "$2"
|
|
confirm Do you want to start the rsync copy? || return 0
|
|
echo copying.....
|
|
rsync --exclude *[C]ache* --progress -a -r -u "$1" "$2"
|
|
}
|