Created
September 20, 2010 16:47
-
-
Save cowboy/588202 to your computer and use it in GitHub Desktop.
Firefox Multifix
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/bash | |
# Firefox Multifix | |
# | |
# Run this bash script from within the folder that contains your Firefox apps, | |
# and every Firefox app in the current folder will be modified to automatically | |
# launch using a version-named profile. For example, "Firefox 2.0.app" will use | |
# the "Firefox 2.0" profile, etc. | |
# | |
# Usage: | |
# http://benalman.com/grab/8b436e.png | |
for ff in ./Firefox*.app | |
do | |
cd "$ff/Contents/MacOS/" | |
if [ ! -f firefox.bin ] | |
then | |
mv firefox-bin firefox.bin | |
fi | |
cat > firefox-bin <<'EOF' | |
#!/bin/bash | |
"$( echo $BASH_SOURCE | sed 's/-bin$/.bin/' )" -P \ | |
"$( echo $BASH_SOURCE | sed -E 's#/.*(Firefox.*)\.app/.*#\1#' )" | |
EOF | |
chmod a+x firefox-bin | |
cd ../../.. | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
TODO: rename
firefox-bin
tofirefox.bin
if it's actually the Mozilla binary (in case of automated updates)