Skip to content

Instantly share code, notes, and snippets.

@Rainyan
Last active September 2, 2025 16:35
Show Gist options
  • Select an option

  • Save Rainyan/f09aaca597d9197a92fc0342d5d20176 to your computer and use it in GitHub Desktop.

Select an option

Save Rainyan/f09aaca597d9197a92fc0342d5d20176 to your computer and use it in GitHub Desktop.
Bash script to compile a SourceMod plugin on Linux for multiple compiler versions. For Windows, see Python script: https://gist.github.com/Rainyan/ce55dec3d07742311bbfdc070e4a5b4f
#!/usr/bin/env bash
# file name without the extension
Plugin=my_plugin
declare -a SmVersions=("1.8" "1.9" "1.10" "1.11" "1.12" "1.13")
BasePath=~/code/spcomp
ExtraIncludes="${BasePath}/includes"
for version in "${SmVersions[@]}"
do
# assuming 32bit compiler
compiler="${BasePath}/${version}/addons/sourcemod/scripting/spcomp"
"$compiler" -i "$ExtraIncludes" "./scripting/${Plugin}.sp"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment