Skip to content

Commit f0910b1

Browse files
committed
Add compile.sh that runs by default.
Prints documentation if /src/build_cmake.sh doesn't exist.
1 parent ee5da5c commit f0910b1

File tree

3 files changed

+21
-1
lines changed

3 files changed

+21
-1
lines changed

Dockerfile

+2-1
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,10 @@ RUN --mount=type=cache,id=${TARGETARCH}/var/cache/apk,target=/var/cache/apk \
2929
apk add --no-cache cmake bash ninja-build && rm /usr/bin/cpack /usr/bin/ctest
3030

3131
COPY --from=builder /usr/local/bin/q3asm /usr/local/bin/q3lcc /usr/local/bin/q3cpp /usr/local/bin/q3rcc /usr/local/bin/
32+
COPY /compile.sh /usr/local/bin/
3233

3334
# cmake needs to have some kind of cc installed, even if not used for regular C code
3435
ENV CC="q3lcc" \
3536
PATH="$PATH:/usr/lib/ninja-build/bin"
3637

37-
WORKDIR /src
38+
CMD ["/usr/local/bin/compile.sh"]

README.md

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
QVM Toolchain Container
2+
-----------------------
3+
Simple access to q3vm compiler toolchain.
4+
5+
```
6+
$ docker build -t ktx-qvm .
7+
$ cd /path/to/ktx
8+
$ docker run --rm -v `pwd`:/src ktx-qvm
9+
```

compile.sh

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/bin/sh
2+
if [ ! -f "/src/build_cmake.sh" ]; then
3+
echo "Could not find KTX source directory!"
4+
echo
5+
echo "Enter the project root and invoke something like:"
6+
echo '$ docker run --rm -v `pwd`:/src ktx-qvm'
7+
exit 1
8+
fi
9+
cd /src
10+
./build_cmake.sh qvm

0 commit comments

Comments
 (0)