Created
February 11, 2013 21:50
-
-
Save jrgm/4757926 to your computer and use it in GitHub Desktop.
start Firefox with disposable profiles on osx
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/sh | |
# start Firefox with disposable profiles on osx | |
# usage: start-ff.sh profilename Firefox.app | |
# start-ff.sh profilename Aurora.app | |
# start-ff.sh profilename Nightly.app | |
PROFILE_NAME=abcabdab-sync1 | |
if [ ! -z "$1" ]; then | |
PROFILE_NAME=$1 | |
fi | |
FIREFOX_APP=Firefox.app | |
if [ ! -z "$2" ]; then | |
FIREFOX_APP=$2 | |
fi | |
PROFILES_DIR=$HOME/test-profiles | |
mkdir -p $PROFILES_DIR/$PROFILE_NAME | |
YYYYMMDD=$(date +%Y%m%d-%H%M)-$(perl -e 'printf("%03d",int(rand()*1000))') | |
export NSPR_LOG_MODULES=timestamp,cookie:5,nsSocketTransport:5,cache:5,nsHttp:5 | |
export NSPR_LOG_FILE=$PROFILES_DIR/nspr_log.$PROFILE_NAME.$YYYYMMDD | |
export MY_LOG_FILE=$PROFILES_DIR/test_log.$PROFILE_NAME.$YYYYMMDD | |
export XRE_PROFILE_PATH=$PROFILES_DIR/$PROFILE_NAME | |
echo "PROFILE_NAME: $PROFILE_NAME" | |
echo "XRE_PROFILE_PATH: $XRE_PROFILE_PATH" | |
echo "NSPR_LOG_MODULES: $NSPR_LOG_MODULES" | |
echo "NSPR_LOG_FILE: $NSPR_LOG_FILE" | |
echo "MY_LOG_FILE: $MY_LOG_FILE" | |
echo "Application: /Applications/$FIREFOX_APP/Contents/MacOS/firefox-bin" | |
/Applications/$FIREFOX_APP/Contents/MacOS/firefox-bin 2>&1 | /opt/local/sbin/tai64n | /opt/local/sbin/tai64nlocal > $MY_LOG_FILE & |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment