Skip to content

Commit

Permalink
ftb: added FTB_FORCE_REINSTALL (#2305)
Browse files Browse the repository at this point in the history
  • Loading branch information
itzg authored Jul 30, 2023
1 parent cb6b793 commit 396d202
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions docs/types-and-platforms/mod-platforms/ftb.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ This mod platform type will automatically take care of downloading and installin
```
- `FTB_MODPACK_VERSION_ID`: optional, the numerical ID of the version to install. If not specified, the latest version will be installed. The "Version ID" can be obtained by hovering over a server file entry and grabbing [this ID in the URL](../../img/ftba-version-id-popup.png).

- `FTB_FORCE_REINSTALL`: if the files become inconsistent, such as when accidentally removing them, the FTB can be forced to re-run by setting this to "true"

### Upgrading

If a specific `FTB_MODPACK_VERSION_ID` was not specified, simply restart the container to pick up the newest modpack version. If using a specific version ID, recreate the container with the new version ID.
Expand Down
4 changes: 3 additions & 1 deletion scripts/start-deployFTBA
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/bin/bash

: "${FTB_FORCE_REINSTALL:=false}"

ftbInstallMarker=".ftb-installed"

# shellcheck source=start-utils
Expand Down Expand Up @@ -32,7 +34,7 @@ elif ! [[ ${FTB_MODPACK_VERSION_ID} =~ [0-9]+ ]]; then
exit 1
fi

if ! [ -f "${ftbInstallMarker}" ] || [ "$(cat "${ftbInstallMarker}")" != "${FTB_MODPACK_ID}=${FTB_MODPACK_VERSION_ID}" ]; then
if isTrue "$FTB_FORCE_REINSTALL" || ! [ -f "${ftbInstallMarker}" ] || [ "$(cat "${ftbInstallMarker}")" != "${FTB_MODPACK_ID}=${FTB_MODPACK_VERSION_ID}" ]; then
ftbInstaller=/data/ftb-installer
if ! [[ -f "${ftbInstaller}" ]]; then
log "Downloading FTB installer"
Expand Down

0 comments on commit 396d202

Please sign in to comment.