Created
January 17, 2023 15:22
-
-
Save moonexpr/48fb3e566cfb1075c649d0fd05fa4bd7 to your computer and use it in GitHub Desktop.
./spcomp64_and_deploy FILE - Compiles a SourcePawn file and places it in ../plugins
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/bash | |
| compiler="spcomp64" | |
| declare -a opts | |
| filename="$1" | |
| if [[ -d include ]]; then | |
| # Include path if found. | |
| opts+="-i include " | |
| fi | |
| smxfile="`echo $1 | sed -e 's/\.sp$/\.smx/'`" | |
| if [[ -f $1 && -d ../plugins ]]; then | |
| # Output to plugins directory if possible. | |
| opts+="-o./../plugins/$smxfile " | |
| else | |
| # Otherwise dump to current directory. | |
| opts+="-o$smxfile " | |
| fi | |
| # Require semicolons | |
| opts+="-; " | |
| opts+="--use-stderr " | |
| $compiler $opts $filename |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment