#!/bin/bash set -u #find executable for python 2. If it's not named "python" make a symlink with that name to it and put it in the path tempdir= python_bin=`which python` `$python_bin --version 2>&1 | grep -q "Python 2."` if [ $? -ne 0 ] then python_bin=`which python2.7` `$python_bin --version 2>&1 | grep -q "Python 2."` if [ $? -ne 0 ] then echo "no valid Python 2 found" exit 1 fi tempdir=`mktemp -d` ln -s $python_bin $tempdir/python export PATH=$tempdir:$PATH fi set -e rm -fr *.xpi cfx xpi --force-mobile #clean up temporary directory if it was created if [ "$tempdir" ] then rm -r $tempdir fi