Skip to content

Instantly share code, notes, and snippets.

@jgornick
Forked from cowboy/firefox_multifix.sh
Created September 20, 2010 16:49
Show Gist options
  • Select an option

  • Save jgornick/588203 to your computer and use it in GitHub Desktop.

Select an option

Save jgornick/588203 to your computer and use it in GitHub Desktop.

Revisions

  1. @cowboy cowboy created this gist Sep 20, 2010.
    27 changes: 27 additions & 0 deletions firefox_multifix.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,27 @@
    #!/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