Created
December 15, 2016 04:07
-
-
Save guyhughes/da2ce2baeec97590bdcc90c8a825c596 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
OPTS='' | |
X="+ */\n" | |
while [ $# -gt 0 ]; do | |
case "$1" in | |
-*) | |
OPTS+="$OPTS $1" | |
;; | |
*) | |
X+="+ **/$1\n" | |
;; | |
esac | |
shift | |
done | |
X+="- *\n" | |
printf "$X" | |
printf "$X" | rsync --inplace -Pvahr $OPTS cabana/ . --include-from="-" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment