diff options
Diffstat (limited to 'build/build.sh')
-rwxr-xr-x | build/build.sh | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/build/build.sh b/build/build.sh new file mode 100755 index 0000000..1f9fa9a --- /dev/null +++ b/build/build.sh @@ -0,0 +1,33 @@ +#!/bin/sh + +INSPIRCD_VERSION=2.0.18 +URL="https://github.com/inspircd/inspircd/archive/v${INSPIRCD_VERSION}.tar.gz" + +cd "$( dirname "$0" )" + +# Build build environment +echo "Building inspircd-build image." +docker build -t "inspircd-build" . + +# Get source +if [ ! -d "inspircd-${INSPIRCD_VERSION}" ]; then + echo "Downloading InspIRCd" + wget $URL + tar xzf "v${INSPIRCD_VERSION}.tar.gz" +fi + +rm -rf ../inspircd && mkdir ../inspircd + +# Start build environment +echo "Starting build..." +docker run \ + -v $(pwd)/inspircd-${INSPIRCD_VERSION}:/inspircd-build \ + -v $(pwd)/../inspircd:/inspircd \ + inspircd-build \ + /build-inner.sh + +echo "\n***********************************************************************" +echo "Build Complete!" +echo "You may now build the inspircd image moving to the root of the" +echo "repository and runng and running:\n" +echo " docker build -t inspircd .\n" |