Last active
August 29, 2015 13:56
-
-
Save thebabush/9269973 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 | |
## Remove Unity package files from project directory. | |
## On windows with GIT installed, use GIT bash. | |
## | |
## Author: Paolo Montesel | |
if [ $# -ne 2 ] | |
then | |
echo "Usage: ./script.sh unity.package projectDirectory" | |
exit | |
fi | |
mkdir -p tmp | |
tar -zxvf $1 -C tmp > /dev/null | |
cat tmp/*/pathname | sed -e "s/A/\nA/" | grep / | sort | sed -e "s/^/$2/" | xargs rm | |
rm -rf tmp |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Stupid script to remove files installed by a Unity package/plugin into your project's directory.
I guess "rm" should give errors when removing a directory so this script will leave empty directories in your Assets directory.