Closed Haryaalcar closed 10 years ago
# Mogenerator Location
if [ -x /usr/local/bin/mogenerator ]; then
echo "mogenerator exists in /usr/local/bin path";
MOGENERATOR_DIR="/usr/local/bin";
elif [ -x /usr/bin/mogenerator ]; then
echo "mogenerator exists in /usr/bin path";
MOGENERATOR_DIR="/usr/bin";
else
echo "mogenerator not found"; exit 1;
fi
changed to
# Mogenerator Location
MOGENERATOR_DIR=$(dirname $(which mogenerator) 2>/dev/null)
if [ ! -z $MOGENERATOR_DIR ]; then
echo "mogenerator exists in $MOGENERATOR_DIR";
else
echo "mogenerator not found"; exit 1;
fi
Looks good... why did you close the pull request?
fixes MacPort location in /opt/local/bin and any future isues of unknown mogenerator location