Skip to content

Instantly share code, notes, and snippets.

@randomize
Last active August 8, 2016 15:00
Show Gist options
  • Save randomize/a3596e0be4ffad36469855f585fd54c8 to your computer and use it in GitHub Desktop.
Save randomize/a3596e0be4ffad36469855f585fd54c8 to your computer and use it in GitHub Desktop.
Simple processor to cleanup StarUML generated things
#!/usr/bin/env bash
gfind ./ -type f -not -path "./.git/*" -iname "*.cs" -exec gsed -i \
-e '1s/^/\
\/\/===----------------------------------------------------------------------===\/\/\
\/\/\
\/\/ vim: ft=cs tw=80\
\/\/\
\/\/ Date: 3\/7\/16 2:33:00\
\/\/ Creator: Star UML\
\/\/\
\/\/===----------------------------------------------------------------------===\/\/\
\
using UnityEngine;\
using BullyFramework;/' \
-e '/System.Linq/d' \
{} \;
gfind ./ -type f -not -path "./.git/*" -iname "*.cs" -exec astyle --style=allman --indent=spaces=4 -N -n {} +
# Preview results
gfind ./ -type f -not -path "./.git/*" -exec file {} +
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment