Skip to content

Commit

Permalink
Fix #18 : If not on Linux only check if the object is present.
Browse files Browse the repository at this point in the history
  • Loading branch information
Flyounet committed Mar 2, 2016
1 parent 8d78753 commit f79c10c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion bm
Expand Up @@ -34,7 +34,10 @@ config() {
[[ "${__w: -1}" != '/' ]] && __w="${__w//\/\//\/}/"
# If a config file is given, we take it first, or look for a default config file
export _BM_CONFIG_FILE="${__w}${_BM_DEFAULT_CONFIG_FILENAME}"
if [ -f "$(readlink -m "${1:-}")" ]; then
if [ "$(uname -s)" = 'Linux' -a -f "$(readlink -m "${1:-}" 2>/dev/null)" ]; then
export _BM_CONFIG_FILE="${1}"
. "${1}"
elif [ -e "${1}" ]; then
export _BM_CONFIG_FILE="${1}"
. "${1}"
elif [ ${__n:=0} -eq 0 -a -f "${__w}${_BM_DEFAULT_CONFIG_FILENAME}" ]; then
Expand Down

0 comments on commit f79c10c

Please sign in to comment.