Last active
December 29, 2016 05:39
-
-
Save fourkbomb/86e6c2f3f3504f7b7a6a0c4d12d0ce55 to your computer and use it in GitHub Desktop.
rebrand.sh
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
#!/usr/bin/perl -ni | |
s/CyanogenMod/LineageOS/g unless /copyright/i; | |
print; | |
if (/Copyright/) { | |
s/20.+? /2017 /g; | |
s/CyanogenMod/LineageOS/; | |
s/Copyright/ /; | |
print; | |
} |
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 | |
# put both files in $PATH, make them executable. | |
# run rebrand.sh in the root of any projects you want to rebrand. | |
find * -name '*strings.xml' -exec rebrand.pl {} \; | |
git diff --stat | grep ' 1 \+' | grep strings.xml | awk '{ print $1 }' | xargs git checkout HEAD -- |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment