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:
parent
74cbe3f450
commit
a954f6cda2
4 changed files with 25 additions and 5 deletions
|
|
@ -1,12 +1,15 @@
|
||||||
from ioft/i386-ubuntu
|
from i386/ubuntu
|
||||||
maintainer Robin Appelman <robin@icewind.nl>
|
maintainer Robin Appelman <robin@icewind.nl>
|
||||||
|
|
||||||
ADD ./install.sh /install.sh
|
ADD ./install.sh /install.sh
|
||||||
RUN mkdir /data \
|
RUN mkdir /data \
|
||||||
|
&& mkdir /include \
|
||||||
&& apt-get update \
|
&& apt-get update \
|
||||||
&& apt-get install -y wget unzip \
|
&& apt-get install -y wget unzip \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
RUN /install.sh
|
RUN /install.sh
|
||||||
|
|
||||||
|
ADD ./spcomp.sh /spcomp.sh
|
||||||
|
|
||||||
WORKDIR /data
|
WORKDIR /data
|
||||||
ENTRYPOINT ["/scripting/spcomp"]
|
ENTRYPOINT ["/spcomp.sh"]
|
||||||
|
|
|
||||||
|
|
@ -6,8 +6,12 @@ Docker image for compiling sourcepawn scripts
|
||||||
|
|
||||||
`docker run --rm -v "$PWD":/data spiretf/spcomp inputfile.sp`
|
`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
|
## Extensions
|
||||||
|
|
||||||
The docker image comes with include files for the following sourcemod extensions
|
The docker image comes with include files for the following sourcemod extensions
|
||||||
|
|
||||||
- [curl](https://forums.alliedmods.net/showthread.php?t=152216)
|
- [curl](https://forums.alliedmods.net/showthread.php?t=152216)
|
||||||
|
|
||||||
|
Additional include files can be added by mounting them inside `/include`
|
||||||
|
|
|
||||||
|
|
@ -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")
|
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 -q $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 -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 "https://forums.alliedmods.net/attachment.php?attachmentid=157128&d=1472513017" -O curl-inc.zip
|
wget -q "https://forums.alliedmods.net/attachment.php?attachmentid=157128&d=1472513017" -O curl-inc.zip
|
||||||
|
|
||||||
tar -xzf sourcemod.tar.gz
|
tar -xzf sourcemod.tar.gz
|
||||||
rm sourcemod.tar.gz
|
rm sourcemod.tar.gz
|
||||||
|
|
|
||||||
13
spcomp.sh
Executable file
13
spcomp.sh
Executable 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
|
||||||
Loading…
Add table
Add a link
Reference in a new issue