Skip to content

Instantly share code, notes, and snippets.

@arkadijs
Last active March 1, 2016 21:41
Show Gist options
  • Save arkadijs/7c551d76b7f6efd06741 to your computer and use it in GitHub Desktop.
Save arkadijs/7c551d76b7f6efd06741 to your computer and use it in GitHub Desktop.
Cat's C Xcode template
#!/bin/sh -xe
cd $HOME/Library/Developer/Xcode
tmpl='Templates/File Templates/Source'
catc=$tmpl/'Cat C File.xctemplate'
mkdir -p "$tmpl"
cp -pr '/Applications/Xcode.app/Contents/Developer/Library/Xcode/Templates/File Templates/Source/C File.xctemplate' "$catc"
find "$catc" -name '*.[ch]' -print0 |
xargs -0 sed -i '' -e 's@___COPYRIGHT___@ != == > <\
// \&\& ||@g'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment