#!/bin/bash CWD="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" DEBUG=false if [ "`uname`" == "Darwin" ]; then FX_EXECUTABLE="/Applications/Firefox.app/Contents/MacOS/firefox" else FX_EXECUTABLE="firefox" fi FX_ARGS="" function usage { cat >&2 < "$PROFILE/extensions/zotero-unit@zotero.org" echo "`dirname "$CWD"`" > "$PROFILE/extensions/zotero@chnm.gmu.edu" cat < "$PROFILE/prefs.js" user_pref("extensions.autoDisableScopes", 0); user_pref("extensions.zotero.debug.log", $DEBUG); user_pref("extensions.zotero.firstRunGuidance", false); user_pref("extensions.zotero.firstRun2", false); EOF MOZ_NO_REMOTE=1 NO_EM_RESTART=1 "$FX_EXECUTABLE" -profile "$PROFILE" \ -chrome chrome://zotero-unit/content/runtests.html -test "$TESTS" $FX_ARGS # Check for success test -e "$PROFILE/success" STATUS=$? # Clean up rm -rf "$PROFILE" exit $STATUS