From 261cc76e8fd3deecdecaabc87d69c72616c8e404 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Lov=C3=A9n?= Date: Sun, 29 Oct 2017 11:31:59 +0100 Subject: [PATCH] Don't hardcode paths --- toolchain/Dockerfile | 1 + toolchain/emul | 4 ++-- toolchain/gdb | 2 +- toolchain/mkiso | 4 ++-- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/toolchain/Dockerfile b/toolchain/Dockerfile index 7e2070c..f98aae8 100644 --- a/toolchain/Dockerfile +++ b/toolchain/Dockerfile @@ -6,4 +6,5 @@ RUN apk --update add make binutils gcc && \ ENV PATH "/opt/toolchain:$PATH" ENV MITTOS64 "true" +ENV BUILDROOT "/opt/" WORKDIR /opt diff --git a/toolchain/emul b/toolchain/emul index e85193a..5932943 100755 --- a/toolchain/emul +++ b/toolchain/emul @@ -2,8 +2,8 @@ if [ -z ${MITTOS64+x} ]; then >&2 echo "Unsupported environment! See README"; exit 1; fi -iso=/opt/mittos64.iso +iso=${BUILDROOT}mittos64.iso -/opt/toolchain/mkiso +${BUILDROOT}toolchain/mkiso qemu-system-x86_64 -s -S -cdrom ${iso} -curses diff --git a/toolchain/gdb b/toolchain/gdb index d16fc76..cc4fefe 100755 --- a/toolchain/gdb +++ b/toolchain/gdb @@ -2,4 +2,4 @@ if [ -z ${MITTOS64+x} ]; then >&2 echo "Unsupported environment! See README"; exit 1; fi -/usr/bin/gdb -q -x /opt/toolchain/gdbinit +/usr/bin/gdb -q -x ${BUILDROOT}toolchain/gdbinit diff --git a/toolchain/mkiso b/toolchain/mkiso index c10b478..6c4e42f 100755 --- a/toolchain/mkiso +++ b/toolchain/mkiso @@ -2,8 +2,8 @@ if [ -z ${MITTOS64+x} ]; then >&2 echo "Unsupported environment! See README"; exit 1; fi -sysroot=/opt/sysroot -iso=/opt/mittos64.iso +sysroot=${BUILDROOT}sysroot +iso=${BUILDROOT}mittos64.iso mkdir -p ${sysroot}