summaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorMichael Olbrich <m.olbrich@pengutronix.de>2017-05-18 08:10:05 +0200
committerMichael Olbrich <m.olbrich@pengutronix.de>2017-05-18 08:10:06 +0200
commit707c42ae2950338b2df85154be2ad48f230a30f4 (patch)
tree0a0ed711f3d524d332ea4cd8bb401c478f104861 /config
parente75189daad66d348b93b2540d67d17dca7d69c16 (diff)
downloadptxdist-707c42ae2950338b2df85154be2ad48f230a30f4.tar.gz
ptxdist-707c42ae2950338b2df85154be2ad48f230a30f4.tar.xz
host-qemu: don't use 'realpath'
It's not available on older Linux distributions. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Diffstat (limited to 'config')
-rwxr-xr-xconfig/qemu/qemu-cross10
1 files changed, 7 insertions, 3 deletions
diff --git a/config/qemu/qemu-cross b/config/qemu/qemu-cross
index 221bd5f36..4c7469190 100755
--- a/config/qemu/qemu-cross
+++ b/config/qemu/qemu-cross
@@ -35,10 +35,14 @@ done
args[${#args[@]}]="${linker}"
args[${#args[@]}]="--inhibit-cache"
-if [ "$(realpath "${1}")" != "${linker}" ]; then
- args[${#args[@]}]="$(realpath "${1}")"
+case "${1}" in
+ /*) cmd="$(readlink -f "${1}")" ;;
+ *) cmd="$(readlink -f "${PWD}/${1}")" ;;
+esac
+if [ "${cmd}" != "${linker}" ]; then
+ args[${#args[@]}]="${cmd}"
fi
- shift
+shift
if [ "${PTXDIST_VERBOSE}" = 1 -a -n "${PTXDIST_FD_LOGFILE}" ]; then
echo "qemu: ${args[@]} ${@}" >&${PTXDIST_FD_LOGFILE}
fi