Skip to content

Commit

Permalink
BusyBox realpath does not support -s flag, fallback to use no flags (R…
Browse files Browse the repository at this point in the history
…Pi-Distro#384)

* BusyBox realpath does not support -s flag, fallback to use no flags

* Fix config sourcing problem
  • Loading branch information
timvisee authored and PeterJohnson committed Nov 7, 2020
1 parent 0805679 commit 22c53d0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions build-docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ IMG_VERSION=${IMG_VERSION:-$(git describe)}

# Ensure that the configuration file is an absolute path
if test -x /usr/bin/realpath; then
CONFIG_FILE=$(realpath -s "$CONFIG_FILE")
CONFIG_FILE=$(realpath -s "$CONFIG_FILE" || realpath "$CONFIG_FILE")
fi

# Ensure that the confguration file is present
Expand All @@ -43,7 +43,7 @@ if test -z "${CONFIG_FILE}"; then
exit 1
else
# shellcheck disable=SC1090
source "${CONFIG_FILE}"
source ${CONFIG_FILE}
fi

while getopts "c:" flag
Expand Down

0 comments on commit 22c53d0

Please sign in to comment.