1
0
Fork 0
mirror of https://codeberg.org/spire/spcomp.git synced 2026-06-03 16:44:08 +02:00

make it easier to add include files and move output to a different directory

This commit is contained in:
Robin Appelman 2017-10-16 00:53:46 +02:00
commit a954f6cda2
4 changed files with 25 additions and 5 deletions

View file

@ -1,12 +1,15 @@
from ioft/i386-ubuntu
from i386/ubuntu
maintainer Robin Appelman <robin@icewind.nl>
ADD ./install.sh /install.sh
RUN mkdir /data \
&& mkdir /include \
&& apt-get update \
&& apt-get install -y wget unzip \
&& rm -rf /var/lib/apt/lists/*
RUN /install.sh
ADD ./spcomp.sh /spcomp.sh
WORKDIR /data
ENTRYPOINT ["/scripting/spcomp"]
ENTRYPOINT ["/spcomp.sh"]

View file

@ -6,8 +6,12 @@ Docker image for compiling sourcepawn scripts
`docker run --rm -v "$PWD":/data spiretf/spcomp inputfile.sp`
If the `/output` directory is mounted then the resulting plugins will be created there.
## Extensions
The docker image comes with include files for the following sourcemod extensions
- [curl](https://forums.alliedmods.net/showthread.php?t=152216)
Additional include files can be added by mounting them inside `/include`

View file

@ -2,9 +2,9 @@
sm_url=$(wget -q -O - "http://www.sourcemod.net/downloads.php?branch=dev" | grep -oE -m1 "https://[a-z.]+/smdrop/[0-9.]+/sourcemod-(.*)-linux.tar.gz")
wget $sm_url -O sourcemod.tar.gz
wget https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/sourcemod-curl-extension/curl_1.3.0.0_linux.zip -O curl.zip
wget "https://forums.alliedmods.net/attachment.php?attachmentid=157128&d=1472513017" -O curl-inc.zip
wget -q $sm_url -O sourcemod.tar.gz
wget -q https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/sourcemod-curl-extension/curl_1.3.0.0_linux.zip -O curl.zip
wget -q "https://forums.alliedmods.net/attachment.php?attachmentid=157128&d=1472513017" -O curl-inc.zip
tar -xzf sourcemod.tar.gz
rm sourcemod.tar.gz

13
spcomp.sh Executable file
View file

@ -0,0 +1,13 @@
#! /bin/sh
cp /include/* /scripting/include
/scripting/spcomp $@
out="${1%.sp}.smx"
chown $(stat -c '%u' $1):$(stat -c '%g' $1) $out
if [ -d "/output" ]; then
mv $out /output
fi