From 5f7f36296faf5ec1d601bac7b40776dbd6668bc6 Mon Sep 17 00:00:00 2001 From: modeco80 Date: Sat, 29 Jul 2023 17:02:03 -0400 Subject: [PATCH] lcpu: make build_module take in the path to the gameserver --- README.md | 2 +- build_module.sh | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 60e102c..a2e8c0b 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ Preliminary installation steps (for Linux): ``` garrysmod/addons$ git clone --recursive https://git.crustywindo.ws/modeco80/gmod-lcpu.git lcpu garrysmod/addons$ cd lcpu -garrysmod/addons/lcpu$ ./build_module.sh +garrysmod/addons/lcpu$ ./build_module.sh [gameserver path] # Tada! ``` diff --git a/build_module.sh b/build_module.sh index 7c346a2..4d122d3 100755 --- a/build_module.sh +++ b/build_module.sh @@ -3,10 +3,11 @@ # Build the LCPU native module for both linux32 and linux64 # and install it into the proper directory gmod wants native modules to be. -set -x - # where your game server is -GS_PATH="/home/lily/gs/gmod" +[[ "$1" == "" ]] && GS_PATH="/home/lily/gs/gmod" +[[ ! "$1" == "" ]] && GS_PATH="$1" + +echo "building for $GS_PATH" # make the module build directory [[ ! -d "module_build" ]] && {