mirror of https://github.com/pelias/docker.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
728 B
23 lines
728 B
7 years ago
|
#!/bin/bash
|
||
|
set -e
|
||
|
|
||
|
# OSX comes bundled with versions of readlink, sed, parallel etc which are not
|
||
|
# compatible with the linux tools. Force OSX users to install the GNU
|
||
|
# compatible versions (prefixed with 'g', such as 'greadlink', 'gsed' etc.).
|
||
|
export CMD_READLINK='readlink'
|
||
|
if [[ "$OSTYPE" == "darwin"* ]]; then
|
||
|
if [ -x "$(command -v greadlink)" ]; then
|
||
|
CMD_READLINK='greadlink';
|
||
|
else
|
||
|
2>&1 echo 'OSX: you must install the gnu standard tooling using:'
|
||
|
2>&1 echo 'brew install coreutils'
|
||
|
fi
|
||
|
fi
|
||
|
|
||
|
# resolve path to this file (following symlinks) and load libs
|
||
|
BASEDIR=$( dirname $( ${CMD_READLINK} -f "${BASH_SOURCE[0]}" ) )
|
||
|
for f in ${BASEDIR}/lib/* ${BASEDIR}/cmd/*; do source $f; done
|
||
|
|
||
|
# cli runner
|
||
|
cli "$@"
|