with those flags thus allowing to choose the package version.
before_script:
- ln -s $PWD data/xonotic-data.pk3dir
+ - export SED=sed
- git clone --depth=1 --branch=master https://gitlab.com/xonotic/gmqcc.git gmqcc
- cd gmqcc && make -j $(nproc) && export QCC="$PWD/gmqcc"
#!/usr/bin/env bash
CPP=${CPP:-cpp}
QCC=${QCC:-$PWD/../../gmqcc/gmqcc${CMAKE_EXECUTABLE_SUFFIX}}
+SED=${SED}
case $1 in
compile)
- ${CPP} ${@:3} | sed 's/^#\(line\)\? \([[:digit:]]\+\) "\(.*\)".*/\n#pragma file(\3)\n#pragma line(\2)/g' > $2
+ ${CPP} ${@:3} | ${SED} 's/^#\(line\)\? \([[:digit:]]\+\) "\(.*\)".*/\n#pragma file(\3)\n#pragma line(\2)/g' > $2
;;
link)
${QCC} \
QCCIDENT="-DGMQCC"
QCCDEFS=${QCCDEFS}
QCCFLAGS=${QCCFLAGS}
+SED=${SED}
function qpp() {
IN=$1
err=$?
set -e
if [ ${err} -ne 0 ]; then return ${err}; fi
- sed 's/^#\(line\)\? \([[:digit:]]\+\) "\(.*\)".*/\n#pragma file(\3)\n#pragma line(\2)/g' "${WORKDIR}/${MODE}.txt"
+ ${SED} 's/^#\(line\)\? \([[:digit:]]\+\) "\(.*\)".*/\n#pragma file(\3)\n#pragma line(\2)/g' "${WORKDIR}/${MODE}.txt"
}
function qcc() {