dotfiles/bin/ocp

19 lines
259 B
Plaintext
Raw Normal View History

2017-03-31 13:54:00 +02:00
#!/bin/bash
USAGE="Usage: $0 target file1 file2 file3 ..."
if [ "$#" == "0" ]; then
echo "$USAGE"
echo
exit 1
fi
TARGET=$1
shift
while (( "$#" )); do
echo "Copying '$1' to '$TARGET'."
rsync --inplace --recursive --progress "$1" "$TARGET"
shift
done