#! /bin/sh # shell scripts executed via Platypus application bundles don't inherit the # user's environment, so we import that environment to give us access to stuff # that might be installed in non-standard locations, e.g. /usr/local if [ -f /etc/profile ]; then source /etc/profile fi if [ -f "$HOME/.bash_profile" ]; then source "$HOME/.bash_profile" elif [ -f "$HOME/.bash_login" ]; then source "$HOME/.bash_login" elif [ -f "$HOME/.profile" ]; then source "$HOME/.profile" fi platypus_par_dir=`dirname ${0}` res_dir=`dirname ${platypus_par_dir}` contents_dir=`dirname ${res_dir}` dot_app_bundle=`dirname ${contents_dir}` export CIPRES_ROOT="${dot_app_bundle}/CIPRES-Root" if ! test -d "${CIPRES_ROOT}" then echo "${CIPRES_ROOT} does not exist." echo "a CIPRES-Root directory must be next to ${dot_app_bundle}" exit 1 fi source "${CIPRES_ROOT}/share/cipres/cipres.bashrc" if test -d "/Applications/Firefox.app" then /usr/bin/perl ${CIPRES_ROOT}/lib/perl/bin/regsrv & pid="$!" sleep 3 #trap "kill $pid" 0 1 3 9 15 24 open -a /Applications/Firefox.app "http://localhost:8077/start.xul?Regman" & else echo "You don't have firefox" exit 1 fi