forked from pelias/docker
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpelias
More file actions
executable file
·22 lines (19 loc) · 728 Bytes
/
pelias
File metadata and controls
executable file
·22 lines (19 loc) · 728 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/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 "$@"