Last active
September 2, 2025 16:35
-
-
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/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