Created
January 28, 2015 04:39
-
-
Save haranicle/554185e2872a3e1ef665 to your computer and use it in GitHub Desktop.
A shell script to remove "___FULLUSERNAME___" and "___COPYRIGHT___" from Xcode templates.
This file contains 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 | |
## inspired by... | |
## Xcodeのヘッダーに挿入されるテンプレートからCopyrightの'年'表示を消す | http://enamelsystems.com/0001/ | |
## Perl - hogeを含む行を削除するワンライナー - Qiita | http://qiita.com/fieldville/items/401ddc40679a9767f56b | |
## Xcode | |
XCODE=Xcode | |
## Base directory which has Xcode header template. | |
BASE="/Applications/${XCODE}.app/Contents/Developer" | |
for i in ${BASE}/Library/Xcode/Templates ${BASE}/Platforms/iPhoneOS.platform/Developer/Library/Xcode/Templates | |
do | |
echo "Replacing copyright ${i}..." | |
cd ${i} | |
sudo find * -type f -exec perl -ni -e "/___FULLUSERNAME___/ or /___COPYRIGHT___/ or print" {} \; | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment