Fix script path detection
This commit is contained in:
@@ -6,17 +6,17 @@ done
|
|||||||
for lib in libsqlite3;do
|
for lib in libsqlite3;do
|
||||||
[ -n "`ldconfig -p | grep ${lib}`" ] || (echo "Please install ${lib}" && exit 1);
|
[ -n "`ldconfig -p | grep ${lib}`" ] || (echo "Please install ${lib}" && exit 1);
|
||||||
done
|
done
|
||||||
DIR="$( cd "$( dirname "$(pwd)/$0" )" && pwd )";
|
dir="$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)"
|
||||||
echo "Located in ${DIR}";
|
echo "Located in ${dir}";
|
||||||
GBMPATH='./';
|
gbmpath='./';
|
||||||
#locate GBM.exe
|
#locate GBM.exe
|
||||||
if [ "${DIR}" = '/bin' ] && [ -s '/usr/share/gbm/GBM.exe' ]; then
|
if [ "${dir}" = '/bin' ] && [ -s '/usr/share/gbm/GBM.exe' ]; then
|
||||||
GBMPATH='/usr/share/gbm/';
|
gbmpath='/usr/share/gbm/';
|
||||||
elif [ "${DIR}" = '/usr/local/bin' ] && [ -s '/usr/local/share/gbm/GBM.exe' ]; then
|
elif [ "${dir}" = '/usr/local/bin' ] && [ -s '/usr/local/share/gbm/GBM.exe' ]; then
|
||||||
GBMPATH='/usr/local/share/gbm/';
|
gbmpath='/usr/local/share/gbm/';
|
||||||
elif [ ! -s './GBM.exe' ]; then
|
elif [ ! -s './GBM.exe' ]; then
|
||||||
echo 'GBM.exe not found';
|
echo 'GBM.exe not found';
|
||||||
exit 2;
|
exit 2;
|
||||||
fi
|
fi
|
||||||
mono --desktop ${GBMPATH}'GBM.exe' "$@";
|
mono --desktop ${gbmpath}'GBM.exe' "$@";
|
||||||
exit $?;
|
exit $?;
|
||||||
|
|||||||
Reference in New Issue
Block a user