mirror of
https://codeberg.org/spire/spcomp.git
synced 2026-06-03 08:34:12 +02:00
build improvements
This commit is contained in:
parent
276512bc0a
commit
1320d078e1
2 changed files with 29 additions and 9 deletions
|
|
@ -1,5 +1,5 @@
|
||||||
from 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 \
|
||||||
|
|
@ -8,8 +8,8 @@ RUN mkdir /data \
|
||||||
&& 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
|
||||||
|
WORKDIR /data
|
||||||
|
|
||||||
ADD ./spcomp.sh /spcomp.sh
|
ADD ./spcomp.sh /spcomp.sh
|
||||||
|
|
||||||
WORKDIR /data
|
|
||||||
ENTRYPOINT ["/spcomp.sh"]
|
ENTRYPOINT ["/spcomp.sh"]
|
||||||
|
|
|
||||||
32
spcomp.sh
32
spcomp.sh
|
|
@ -1,18 +1,38 @@
|
||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
|
|
||||||
cp /include/* /scripting/include
|
if [ -e "/include/*" ]; then
|
||||||
|
cp /include/* /scripting/include
|
||||||
|
fi
|
||||||
|
|
||||||
/scripting/spcomp $@
|
IN=$@
|
||||||
|
cd $(dirname $IN)
|
||||||
|
|
||||||
out="${1%.sp}.smx"
|
IN="$(basename $IN)"
|
||||||
|
OUT="${IN%.sp}.smx"
|
||||||
|
|
||||||
chown $(stat -c '%u' $1):$(stat -c '%g' $1) $out
|
if [ "$IN" -ot "$OUT" ]; then
|
||||||
|
echo "Compiled file already up to date"
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -z "$OUTPUT" ]; then
|
||||||
|
if [ "$IN" -ot "$OUTPUT" ]; then
|
||||||
|
echo "Compiled file already up to date"
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
/scripting/spcomp $IN
|
||||||
|
|
||||||
|
OUT="${IN%.sp}.smx"
|
||||||
|
|
||||||
|
chown $(stat -c '%u' $IN):$(stat -c '%g' $IN) $OUT
|
||||||
|
|
||||||
if [ -d "/output" ]; then
|
if [ -d "/output" ]; then
|
||||||
mv $out /output
|
cp $OUT /output
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ! -z "$OUTPUT" ]
|
if [ ! -z "$OUTPUT" ]
|
||||||
then
|
then
|
||||||
cp /output/$out $OUTPUT
|
cp $OUT $OUTPUT
|
||||||
fi
|
fi
|
||||||
Loading…
Add table
Add a link
Reference in a new issue