Skip to content

Commit

Permalink
added retrieval of result
Browse files Browse the repository at this point in the history
  • Loading branch information
anthony-cros committed Dec 5, 2015
1 parent d844ed9 commit b99d13a
Show file tree
Hide file tree
Showing 6 changed files with 37 additions and 20 deletions.
File renamed without changes.
17 changes: 11 additions & 6 deletions build-xcompiler-armel.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
#!/bin/bash
docker build \
-t xcompiler \
-f Dockerfile-xcompiler \
.
#!/bin/bash -e
DEST_DIR=${1?}; if [ ! -w "${DEST_DIR?}" ]; then echo "ERROR: cannot write to the destination dir provided: '${DEST_DIR?}'"; exit 1; fi
./build-xcompiler-base.sh
CONTAINER_ID=$(date "+%y%m%d%H%M%S")
docker run \
--name="${CONTAINER_ID?}" \

This comment has been minimized.

Copy link
@anthony-cros

anthony-cros Dec 5, 2015

Author Member

this is where the container name can be given (and later used in place of ID)

-t xcompiler \
./ct-ng.sh \
/home/xcompiler/ct-ng \
"/home/xcompiler/ct-ng" \
"none" \
"arm-unknown-linux-gnueabi" \
"1.20.0" # "none" is a special value, as opposed to a file path
docker cp \

This comment has been minimized.

Copy link
@anthony-cros

anthony-cros Dec 5, 2015

Author Member

we can just use docker-cp to retrieve tarball, provided we control the name of the container

${CONTAINER_ID?}:/home/xcompiler/x-tools.tgz \
${DEST_DIR?}/
ls ${DEST_DIR?}/x-tools.tgz

13 changes: 0 additions & 13 deletions build-xcompiler-armhf.sh

This file was deleted.

5 changes: 5 additions & 0 deletions build-xcompiler-base.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
docker build \
-t xcompiler \
-f Dockerfile-xcompiler \
.

17 changes: 17 additions & 0 deletions build-xcompiler-wandboard.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/bash -e
DEST_DIR=${1?}; if [ ! -w "${DEST_DIR?}" ]; then echo "ERROR: cannot write to the destination dir provided: '${DEST_DIR?}'"; exit 1; fi
./build-xcompiler-base.sh
CONTAINER_ID=$(date "+%y%m%d%H%M%S")
docker run \
--name="${CONTAINER_ID?}" \
-t xcompiler \
./ct-ng.sh \
"/home/xcompiler/ct-ng" \
"conf/wandboard.config" \
"arm-unknown-linux-gnueabi" \
"1.20.0"
docker cp \
${CONTAINER_ID?}:/home/xcompiler/x-tools.tgz \
${DEST_DIR?}/
ls ${DEST_DIR?}/x-tools.tgz

5 changes: 4 additions & 1 deletion cross-build/ct-ng/ct-ng.sh
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,10 @@ ct-ng build

ls "${CROSS_COMPILER_DIR?}/bin/${TARGET_ARCHITECTURE?}-gcc"
echo
tree "${CROSS_COMPILER_DIR?}"
tree -L 3 "${CROSS_COMPILER_DIR?}"
cd $HOME
tar --remove-files -zcf $HOME/x-tools.tgz ./x-tools

This comment has been minimized.

Copy link
@anthony-cros

anthony-cros Dec 5, 2015

Author Member

since it's not meant to be used in that container anyway, we might as well tarball it and remove the directory

ls $HOME/x-tools.tgz

# ===========================================================================

1 comment on commit b99d13a

@bobsummerwill
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool beans - thanks!

Please sign in to comment.