[Bash] Autoupdate the AMXX to the latest version [1.9 / 1.10]
I've modified compile.sh and created update.sh to simplify the process of compiling plugins and updating AMXX on unix based operating systems.
More information and examples shown below. compile.sh >
- Compile single or multiple files Single file: ./compile.sh admin.sma Multiple files: ./compile.sh admin.sma adminchat.sma admincmd.sma - Compile all source files ./compile.sh All compiled plugins are located at addons/amxmodx/scripting/compiled - Display help menu Code:
./compile.sh --help Code:
./compile.sh --version
- Display help menu Code:
./update.sh --help Code:
./update.sh --latest
Spoiler
- Setup the autoupdater Run ./update.sh --setup and specify the game that the server is currently running. To setup the autoupdate the current version of AMXX must be either 1.9 or 1.10, which you can see it at ./compile.sh --version If you get an error saying amxxpc does not exists then the only option is to update the game files using ./update.sh --update The autoupdater loads a hidden file (addons/amxmodx/scripting/.save_data) that this file is created after successfully updating using ./update.sh --update. The scripts checks if there's a new version and if so it automatically updates without user interaction. Note: You must run --update then use --auto - How to lauch autoupdater every server restart? Firstly you need the .save_data file to load the configurations. If you are missing the file, you can create one yourself or get it from updating the files: ./update.sh --update If you are not able to use the terminal, you can create a dummy file and set the build version to a random number which will cause the autoupdater think that this is an old version and updated the files for you Dummy file Code:
.save_data > The autoupdater will loop through each value and compare it with the files and decide if this file should be replaced or not. After setting up .save_data modify the server start options as shown below: bash <gamemod>/addons/amxmodx/scripting/update.sh --auto && <your-current-server-start-script> e.g: bash cstrike/addons/amxmodx/compile.sh --auto && screen -S server ./hlds_run -game cstrike -port 27015 +map de_dust2 +maxplayers 32 +sys_tickrate 512 +fps_max 512 Or your can run a side bash script to auto update Note: Repacing modules meanwhile the server is running may cause the server to crash. screen -S autoupdate ./autoupdate.sh Code:
autoupdate.sh > If your server is running either 1.9 or 1.10, you can setup the autoupdater and run the autoupdate.sh script. ./update.sh --setup If your server is on a older version, you can update to 1.9 or 1.10 and lauch the autoupdate.sh script. ./update.sh --update * compile.sh Pull Request https://github.com/alliedmodders/amxmodx/pull/870 * update.sh Pull Request https://github.com/alliedmodders/amxmodx/pull/871 * Download compile.sh (CTRL + S) https://raw.githubusercontent.com/Cr...ins/compile.sh * Download update.sh (CTRL + S) https://raw.githubusercontent.com/Cr...gins/update.sh Stat counting
Spoiler
|
Re: [Bash] Autoupdate the AMXX to the latest version [1.9 / 1.10]
Nice job mate.
|
Re: [Bash] Autoupdate the AMXX to the latest version [1.9 / 1.10]
Quote:
|
Re: [Bash] Autoupdate the AMXX to the latest version [1.9 / 1.10]
Seems like a completely inappropriate place to put auto-update code for the entirety of AMX Mod X. I think that if something like this existed, it would need to be its own script since it's has absolutely nothing to do with compiling a plugin.
|
Re: [Bash] Autoupdate the AMXX to the latest version [1.9 / 1.10]
Updated.
|
Re: [Bash] Autoupdate the AMXX to the latest version [1.9 / 1.10]
Nice God Job Man :avast:
|
All times are GMT -4. The time now is 14:13. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.