#!/bin/bash -e


CRX_FILENAME=`pwd`/../chromium-extension.crx
PEM_FILENAME=`pwd`/../chromium-extension.pem

if [ -e "$CRX_FILENAME" ]
then
    rm -f "$CRX_FILENAME"
fi

#if [ -e "$PEM_FILENAME" ]
#then
#    rm -f "$PEM_FILENAME"
#fi

if test -n "`which google-chrome`"; then
    google-chrome --no-message-box --pack-extension=`pwd` --pack-extension-key=../chromium-extension.pem
else
    chromium-browser --no-message-box --pack-extension=`pwd`
fi

# not necessary
# mv `pwd`/../unity-chromium-extension.crx .



