Created
April 17, 2015 18:32
-
-
Save e0da/2b61e8b1fb280304b7f0 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 | |
readonly empty_dir=$(mktemp -d) | |
readonly target="$1" | |
rm -rf "$empty_dir" | |
mkdir "$empty_dir" | |
rsync --recursive --delete "$empty_dir"/ "$target"/ | |
rmdir "$empty_dir" "$target" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment