changed experimental parameter to version parameter
This commit is contained in:
parent
17a0506839
commit
df8637ab87
3 changed files with 9 additions and 8 deletions
|
@ -30,7 +30,8 @@ These three `.sh` files were created for Infern009's Factorio server, and use [B
|
|||
- `cp config.sh.example config.sh`
|
||||
- Modify the parameters in `config.sh`.
|
||||
- `save_name` - This parameter controls the name of the save file this script will use to start the server.
|
||||
- `experimental` - This parameter controls if the script will download the latest build or the experimental build of the game. See the [Factorio download page](https://www.factorio.com/download) for more information.
|
||||
- `version` - This parameter controls what version of Factorio the script will download. See the [Factorio archived downloads page](https://factorio.com/download/archive/) for a list of versions.
|
||||
- Set this parameter to `stable` if you want the most recent stable release of the game, and `latest` if you want the most recent experimental release.
|
||||
- If you have modified any default config files except for the `config.ini`, you'll want to change the commands' parameters to match those files. I'll assume you're storing them in the `./data` directory. You can find more arguments on the [Factorio Wiki](https://wiki.factorio.com/Command_line_parameters).
|
||||
- `extra_params_create=""` - This parameter adds additional flags to the `--create` command the script runs if a save matching `save_name` is not found.
|
||||
- `--map-gen-settings ./data/map-gen-settings.json`
|
||||
|
|
|
@ -2,7 +2,9 @@
|
|||
|
||||
save_name="default" # Set this to the name of your save file.
|
||||
|
||||
experimental="false" # This decides whether or not to download the experimental/latest build of the game, or the stable version.
|
||||
# Set this to the version of Factorio you want the server to run.
|
||||
# 'stable' downloads the most recent stable release and 'latest' downloads the most recent experimental release.
|
||||
version="stable"
|
||||
|
||||
# Don't change this unless you know what you're doing.
|
||||
# Set this to the custom parameters you want the --create command to use.
|
||||
|
|
|
@ -37,12 +37,10 @@ fi
|
|||
|
||||
# This handles automatically updating the Factorio binary.
|
||||
echo "Fetching Factorio binary..."
|
||||
if [ "$experimental" = "true" ]; then
|
||||
wget https://factorio.com/get-download/latest/headless/linux64 -O factorio_headless.tar.xz
|
||||
elif [ "$experimental" = "false" ]; then
|
||||
wget https://factorio.com/get-download/stable/headless/linux64 -O factorio_headless.tar.xz
|
||||
else
|
||||
echo "FATAL: ${configpath} file is misconfigured! Experimental variable is not set correctly. Must be 'true' or 'false'."
|
||||
wget "https://factorio.com/get-download/${version}/headless/linux64" -O factorio_headless.tar.xz
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "FATAL: There is not a headless linux64 build available for the version you've selected in your ${configpath} file."
|
||||
echo "FATAL: See this website for a list of all Factorio versions: https://factorio.com/download/archive/"
|
||||
exit 1
|
||||
fi
|
||||
echo "Extracting Factorio binary..."
|
||||
|
|
Loading…
Reference in a new issue