This repository has been archived on 2022-02-20. You can view files and clone it, but cannot push or open issues/pull-requests.
2020-11-13 10:25:04 -08:00
|
|
|
#!/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.....
|
2021-02-11 18:29:28 -08:00
|
|
|
rsync --exclude *[C]ache* --progress -a -r -u "$1" "$2"
|
2020-11-13 10:25:04 -08:00
|
|
|
}
|