-
-
Save jsntn/bf0f002cda668b5b8b69c0733024c615 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
BASE_DIR=$(dirname $0) | |
BUILD_SCRIPT_NAME="build-git.sh" | |
BUILD_SCRIPT="${BASE_DIR}/${BUILD_SCRIPT_NAME}" | |
if [ ! -d /share/Public/toolchain ]; then | |
mkdir /share/Public/toolchain | |
fi | |
if [ -z "$(system-docker ps | grep 'builder')" ]; then | |
system-docker run --name builder --privileged -v /share/Public/toolchain:/share/Public/toolchain -d sdhuang32/c7-systemd | |
fi | |
system-docker cp ${BUILD_SCRIPT} builder:/root/${BUILD_SCRIPT_NAME} | |
system-docker exec -t builder bash /root/${BUILD_SCRIPT_NAME} | |
if [ -z "$(cat /etc/profile | grep 'toolchain')" ]; then | |
echo "PATH=/share/Public/toolchain/bin:\$PATH" >> /etc/profile | |
fi | |
system-docker stop builder; system-docker rm builder |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment