Skip to content

Instantly share code, notes, and snippets.

@adamwespiser
Created August 23, 2019 21:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save adamwespiser/60db76d1afaf398219e9c6b9a84a0fed to your computer and use it in GitHub Desktop.
Save adamwespiser/60db76d1afaf398219e9c6b9a84a0fed to your computer and use it in GitHub Desktop.
#!/bin/sh -e
alias firefox=/Applications/Firefox.app/Contents/MacOS/firefox
DIR="${XDG_CACHE_HOME:-$HOME/.cache}"
mkdir -p -- "$DIR"
TEMP="$(mktemp -d -- "$DIR/firefox-XXXXXX")"
trap "rm -rf -- '$TEMP'" INT TERM EXIT
firefox -profile "$TEMP" -no-remote "$@"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment