Created
March 30, 2025 19:26
-
-
Save hrdwdmrbl/5695229c19c60eeb059e957710aef7d8 to your computer and use it in GitHub Desktop.
A shell script for making copies of Firefox. Each copy runs their own profile so that I can have 3 separate sets of cookies.
This file contains hidden or 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
| rm -rf /Applications/Firefox\ H.app | |
| rm -rf /Applications/Firefox\ K.app | |
| rm -rf /Applications/Firefox\ P.app | |
| cp -R /Applications/Firefox.app /Applications/Firefox\ H.app | |
| cp -R /Applications/Firefox.app /Applications/Firefox\ K.app | |
| cp -R /Applications/Firefox.app /Applications/Firefox\ P.app | |
| # Copy icons | |
| cp ~/Applications/Split\ Firefox/horse.icns /Applications/Firefox\ H.app/Contents/Resources/firefox.icns | |
| cp ~/Applications/Split\ Firefox/kigurumi.icns /Applications/Firefox\ K.app/Contents/Resources/firefox.icns | |
| cp ~/Applications/Split\ Firefox/personal.icns /Applications/Firefox\ P.app/Contents/Resources/firefox.icns | |
| # Find replace | |
| sed -i '' 's/\<string>Firefox\<\/string>/\<string>Firefox-Personal\<\/string>/g' /Applications/Firefox\ P.app/Contents/Info.plist | |
| sed -i '' 's/\<string>Firefox\<\/string>/\<string>Firefox-Kigurumi\<\/string>/g' /Applications/Firefox\ K.app/Contents/Info.plist | |
| sed -i '' 's/\<string>Firefox\<\/string>/\<string>Firefox-Horse\<\/string>/g' /Applications/Firefox\ H.app/Contents/Info.plist | |
| sed -i '' 's/\<string>org.mozilla.firefox\<\/string>/\<string>org.mozilla.firefox-personal\<\/string>/g' /Applications/Firefox\ P.app/Contents/Info.plist | |
| sed -i '' 's/\<string>org.mozilla.firefox\<\/string>/\<string>org.mozilla.firefox-kigurumi\<\/string>/g' /Applications/Firefox\ K.app/Contents/Info.plist | |
| sed -i '' 's/\<string>org.mozilla.firefox\<\/string>/\<string>org.mozilla.firefox-horse\<\/string>/g' /Applications/Firefox\ H.app/Contents/Info.plist | |
| # NOTE: May require that you set up your own personal cert. in XCode | |
| codesign --deep --force --sign "MyLocalCodeSignCert" /Applications/Firefox\ H.app | |
| codesign --deep --force --sign "MyLocalCodeSignCert" /Applications/Firefox\ K.app | |
| codesign --deep --force --sign "MyLocalCodeSignCert" /Applications/Firefox\ P.app |
Author
Author
Usage
- Create the folder
~/Applications/Split\ Firefox - Copy the script to
~/Applications/Split\ Firefox - Replace
FIrefox H,Firefox KandFirefox Pin the script with your names. - Set up your images within the folder
~/Applications/Split\ Firefox/so that the copies will have your icons. Icons are just square pngs with the extension switched to.icns. - Give the script execution permission
- Run it!
Note: It may require that you set up your own personal cert in XCode for the codesign to work properly.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Caveat: To update Firefox, you update the "base" application "Firefox.app" and then re-run this script to create the copies.