Skip to content

Instantly share code, notes, and snippets.

@fourkbomb
Last active December 29, 2016 05:39
Show Gist options
  • Save fourkbomb/86e6c2f3f3504f7b7a6a0c4d12d0ce55 to your computer and use it in GitHub Desktop.
Save fourkbomb/86e6c2f3f3504f7b7a6a0c4d12d0ce55 to your computer and use it in GitHub Desktop.
rebrand.sh
#!/usr/bin/perl -ni
s/CyanogenMod/LineageOS/g unless /copyright/i;
print;
if (/Copyright/) {
s/20.+? /2017 /g;
s/CyanogenMod/LineageOS/;
s/Copyright/ /;
print;
}
#!/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