#!/bin/sh
#set -x # Uncomment "set -x" for debugging

export MOZILLA_FIVE_HOME="/usr/lib/MozillaFirebird"
FIREBIRD_PATH="/usr/lib/MozillaFirebird"

if [ -z "`ps x | grep \"[0-9] ${FIREBIRD_PATH}/MozillaFirebird-bin\"`" ]; then
    # No MozillaFirebird running
    ${FIREBIRD_PATH}/MozillaFirebird $@
else
    # MozillaFirebird running - open a new window
    ${FIREBIRD_PATH}/MozillaFirebird -remote "openURL($@ ,new-window)"
fi 
