]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - cmake/qcc.sh
Fix wrong check causing bots to seek more already owned weapons and less not owned...
[xonotic/xonotic-data.pk3dir.git] / cmake / qcc.sh
index 0fbd8db12a4fe40b0d9148620b8311afb94094ef..b7c77fd563a35a24ca2b4c1c1b5a4319861b5d52 100755 (executable)
@@ -1,9 +1,9 @@
-#!/bin/bash
-QCC=${QCC:-$(dirname "$0")/../../../gmqcc/gmqcc}
+#!/usr/bin/env bash
+CPP=${CPP:-cpp}
+QCC=${QCC:-$PWD/../../gmqcc/gmqcc${CMAKE_EXECUTABLE_SUFFIX}}
 case $1 in
     compile)
-        echo $@
-        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} \