Skip to content

Instantly share code, notes, and snippets.

@thebabush
Last active August 29, 2015 13:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thebabush/9269973 to your computer and use it in GitHub Desktop.
Save thebabush/9269973 to your computer and use it in GitHub Desktop.
#!/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
@thebabush
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment