Skip to content

Commit

Permalink
Update bin/alh.sh
Browse files Browse the repository at this point in the history
On Mac OS X, "readlink -f" isn't supported.  But "greadlink" (GNU readlink) works just fine.  This patch should fix the script for Mac users.
  • Loading branch information
nolanlawson committed Jan 1, 2013
1 parent 2e2b07d commit 3852dac
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion bin/alh.sh
Expand Up @@ -2,6 +2,19 @@
#
# Start-up script

L10N_HELPER_HOME="$(dirname "$(readlink -f "$0")")/.."
L10N_COMMAND=readlink

# Mac OS X doesn't support "readlink -f", but Homebrew offers a "coreutils"
# package that contains "greadlink" (GNU readlink)
if [ `uname` = 'Darwin' ]; then
L10N_COMMAND=greadlink
if [ -z `which greadlink` ]; then
echo "greadlink not found. Please install it using homebrew:" 1>&2
echo "brew install coreutils" 1>&2
exit 1
fi
fi

L10N_HELPER_HOME="$(dirname "$($L10N_COMMAND -f "$0")")/.."

java -jar $L10N_HELPER_HOME/lib/l10n-helper.jar $1 $2

0 comments on commit 3852dac

Please sign in to comment.