Skip to content

Instantly share code, notes, and snippets.

@MighteeCactus
Last active August 3, 2017 11:57
Show Gist options
  • Save MighteeCactus/99bb7ec8d1c7be9da587a0490abb4187 to your computer and use it in GitHub Desktop.
Save MighteeCactus/99bb7ec8d1c7be9da587a0490abb4187 to your computer and use it in GitHub Desktop.
Unity. Strip all packing tags in the folder. Script accepts one argument which is the folder in which to search for meta files.
#!/bin/bash
# script accepts one argument which is the folder in which to search for meta files.
# on MacOS sed -i is required to have extension of the backup file, script will remove
# backups in the end.
cd "$@"
for name in `find . -name "*.meta"`;
do
echo "Strpping tag in $name"
sed -i '.mybakfile' 's/spritePackingTag:.*$/spritePackingTag: /g' $name
done
for name in `find . -name "*.mybakfile"`;
do
echo "Removing $name"
rm $name
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment