|
| 1 | +#!/bin/zsh |
| 2 | + |
| 3 | +# Replace bundle identifiers in file contents |
| 4 | +echo $'(1/9) Replacing com.\u0061\u0070\u0070\u006C\u0065.JavaScriptCore' |
| 5 | +LC_ALL=C git grep -lz $'com.\u0061\u0070\u0070\u006C\u0065.JavaScriptCore' . |\ |
| 6 | + xargs -0 gsed -i $'s|com.\u0061\u0070\u0070\u006C\u0065.JavaScriptCore|com.matthewbenedict.JavaScriptCore|g' |
| 7 | +echo $'(2/9) Replacing com.\u0061\u0070\u0070\u006C\u0065.WebCore' |
| 8 | +LC_ALL=C git grep -lz $'com.\u0061\u0070\u0070\u006C\u0065.WebCore' . |\ |
| 9 | + xargs -0 gsed -i $'s|com.\u0061\u0070\u0070\u006C\u0065.WebCore|com.matthewbenedict.WebCore|g' |
| 10 | +echo $'(3/9) Replacing com.\u0061\u0070\u0070\u006C\u0065.WebKitLegacy' |
| 11 | +LC_ALL=C git grep -lz $'com.\u0061\u0070\u0070\u006C\u0065.WebKitLegacy' . |\ |
| 12 | + xargs -0 gsed -i $'s|com.\u0061\u0070\u0070\u006C\u0065.WebKitLegacy|com.matthewbenedict.WebKitLegacy|g' |
| 13 | +echo $'(4/9) Replacing com.\u0061\u0070\u0070\u006C\u0065.WebKit' |
| 14 | +LC_ALL=C git grep -lz $'com.\u0061\u0070\u0070\u006C\u0065.WebKit' . |\ |
| 15 | + xargs -0 gsed -i $'s|com.\u0061\u0070\u0070\u006C\u0065.WebKit|com.matthewbenedict.WebKit|g' |
| 16 | +echo $'(5/9) Replacing com.\u0061\u0070\u0070\u006C\u0065.\$(PRODUCT_NAME:rfc1034identifier)' |
| 17 | +LC_ALL=C git grep -lz $'com.\u0061\u0070\u0070\u006C\u0065.\$(PRODUCT_NAME:rfc1034identifier)' . |\ |
| 18 | + xargs -0 gsed -i $'s|com.\u0061\u0070\u0070\u006C\u0065.\$(PRODUCT_NAME:rfc1034identifier)|com.matthewbenedict.\$(PRODUCT_NAME:rfc1034identifier)|g' |
| 19 | + |
| 20 | +# Rename bundle identifiers in filenames |
| 21 | +echo $'(6/9) Renaming com.\u0061\u0070\u0070\u006C\u0065.JavaScriptCore' |
| 22 | +find . -name $'*com.\u0061\u0070\u0070\u006C\u0065.JavaScriptCore*' \ |
| 23 | + -exec /opt/homebrew/bin/rename $'s|com.\u0061\u0070\u0070\u006C\u0065.JavaScriptCore|com.matthewbenedict.JavaScriptCore|g' {} ";" |
| 24 | +echo $'(7/9) Renaming com.\u0061\u0070\u0070\u006C\u0065.WebCore' |
| 25 | +find . -name $'*com.\u0061\u0070\u0070\u006C\u0065.WebCore*' \ |
| 26 | + -exec /opt/homebrew/bin/rename $'s|com.\u0061\u0070\u0070\u006C\u0065.WebCore|com.matthewbenedict.WebCore|g' {} ";" |
| 27 | +echo $'(8/9) Renaming com.\u0061\u0070\u0070\u006C\u0065.WebKitLegacy' |
| 28 | +find . -name $'*com.\u0061\u0070\u0070\u006C\u0065.WebKitLegacy*' \ |
| 29 | + -exec /opt/homebrew/bin/rename $'s|com.\u0061\u0070\u0070\u006C\u0065.WebKitLegacy|com.matthewbenedict.WebKitLegacy|g' {} ";" |
| 30 | +echo $'(9/9) Renaming com.\u0061\u0070\u0070\u006C\u0065.WebKit' |
| 31 | +find . -name $'*com.\u0061\u0070\u0070\u006C\u0065.WebKit*' \ |
| 32 | + -exec /opt/homebrew/bin/rename $'s|com.\u0061\u0070\u0070\u006C\u0065.WebKit|com.matthewbenedict.WebKit|g' {} ";" |
| 33 | + |
| 34 | +# Update git to track this |
| 35 | +git add -A |
0 commit comments