From d8ab42d4dcc3c8cae36a229a4cd885c09bab96a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20W=C3=A4ckerlin?= Date: Fri, 25 Nov 2016 11:37:03 +0000 Subject: [PATCH] fix path creation bug --- scripts/bootstrap.sh | 4 ++-- scripts/build-in-docker.sh | 15 ++++++++++++++- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/scripts/bootstrap.sh b/scripts/bootstrap.sh index 6645719..288d352 100755 --- a/scripts/bootstrap.sh +++ b/scripts/bootstrap.sh @@ -1063,8 +1063,8 @@ Restart=on-abort [Install] WantedBy=multi-user.target EOF -if testtag AX_USE_DEBIAN_PACKAGING; then - checkdir AX_USE_NODEJS nodejs/public/images +if testtag AX_USE_NODEJS; then + checkdir nodejs/public/images fi to --condition AX_USE_NODEJS nodejs/public/javascripts/${PACKAGE_NAME}.js < mode: apt or yum, default: ${mode}" echo " -i, --image use given docker image instead of ${img}" + echo " -a, --arch build for given hardware architecture" echo " -t, --targets targets specify build targets, default: ${targets}" echo " -r, --repo add given apt repository" echo " -k, --key add public key from url" @@ -78,6 +84,9 @@ while test $# -gt 0; do (-i|--image) shift; img="$1" ;; + (-a|--arch) shift; + arch="$1" + ;; (-t|--targets) shift; targets="$1" ;; @@ -183,8 +192,12 @@ function ifthenelse() { set -x docker pull $img -DOCKER_ID=$(docker run -d ${dirs[@]} ${envs[@]} -e HOME="${HOME}" -w /workdir $img sleep infinity) +DOCKER_ID=$(docker create -d ${dirs[@]} ${envs[@]} -e HOME="${HOME}" -w /workdir $img sleep infinity) trap 'traperror '"${DOCKER_ID}"' "$? ${PIPESTATUS[@]}" $LINENO $BASH_LINENO "$BASH_COMMAND" "${FUNCNAME[@]}" "${FUNCTION}"' SIGINT INT TERM EXIT +if ! [[ $arch =~ $myarch ]]; then + docker cp "/usr/bin/qemu-${arch}-static" "${DOCKER_ID}:/usr/bin/qemu-${arch}-static" +fi +docker start "${DOCKER_ID}" case $mode in (apt) OPTIONS='-o Dpkg::Options::=--force-confdef -o Dpkg::Options::=--force-confnew -y --force-yes --no-install-suggests --no-install-recommends'