aboutsummaryrefslogtreecommitdiff
path: root/srcds-pkgs/sourcemod/setup-hook.sh
diff options
context:
space:
mode:
authoryuuko <yuuko@partyvan.io>2024-08-29 21:51:04 -0700
committeryuuko <yuuko@partyvan.io>2024-08-29 21:51:04 -0700
commit56449e59d7aabd1c06fb67a51a1e129b55cb9270 (patch)
tree19f3faf805e9b6461a5940d1a050d13e5271ef55 /srcds-pkgs/sourcemod/setup-hook.sh
break out of system config
Diffstat (limited to 'srcds-pkgs/sourcemod/setup-hook.sh')
-rw-r--r--srcds-pkgs/sourcemod/setup-hook.sh16
1 files changed, 16 insertions, 0 deletions
diff --git a/srcds-pkgs/sourcemod/setup-hook.sh b/srcds-pkgs/sourcemod/setup-hook.sh
new file mode 100644
index 0000000..17d8617
--- /dev/null
+++ b/srcds-pkgs/sourcemod/setup-hook.sh
@@ -0,0 +1,16 @@
+SPCOMPFLAGS=${SPCOMPFLAGS:-}
+dontUseSourcepawnFindHeaders=${dontUseSourcepawnFindHeaders:-}
+sourcepawnFindHeaders(){
+ [ -n "${dontUseSourcepawnFindHeaders:-}" ] && return
+ for plug in $buildInputs; do
+ local ipath="$plug/share/addons/sourcemod/scripting/include"
+ if [ -d "$ipath" ]; then
+ echo "found sourcepawn headers: \"$ipath\""
+ SPCOMPFLAGS="$SPCOMPFLAGS -i $ipath"
+ fi
+ done
+ dontUseSourcepawnFindHeaders=1
+ export SPCOMPFLAGS dontUseSourcepawnFindHeaders
+}
+
+addEnvHooks "$targetOffset" sourcepawnFindHeaders