2
0

run.sh 751 B

1234567891011121314
  1. #!/bin/bash
  2. echo "Running with \"${*}\"..."
  3. # Assume we're in wolfssl/Docker
  4. WOLFSSL_DIR=$(builtin cd ${BASH_SOURCE%/*}/..; pwd)
  5. docker build -t wolfssl/wolfssl-builder --build-arg UID=$(id -u) --build-arg GID=$(id -g) "${WOLFSSL_DIR}/Docker" && \
  6. docker run --rm -it -v ${HOME}/.gitconfig:/home/docker/.gitconfig:ro -v ${HOME}/.ssh:/home/docker/.ssh:ro -v "${WOLFSSL_DIR}:/tmp/wolfssl" -w /tmp/wolfssl wolfssl/wolfssl-builder /bin/bash -c "./autogen.sh && ./configure ${*@Q} && make" && \
  7. docker run --rm -it -v ${HOME}/.gitconfig:/home/docker/.gitconfig:ro -v ${HOME}/.ssh:/home/docker/.ssh:ro -v "${WOLFSSL_DIR}:/tmp/wolfssl" -w /tmp/wolfssl wolfssl/wolfssl-builder /bin/bash
  8. exitval=$?
  9. echo "Exited with error code $exitval"
  10. exit $exitval