Last active
September 10, 2023 11:21
-
-
Save davawen/bdaa0f83343c512f3400973ffbc98f25 to your computer and use it in GitHub Desktop.
This file contains 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
#!/bin/bash | |
# Distributed with the MIT License (https://mit-license.org/) | |
# Launches satisfactory and syncs savefiles to S3 storage on exit | |
# Put this script anywhere you like such as ~/.local/bin/ | |
# Make sure to make it executable with `chmod +x sync_saves.sh` | |
# You need to create an S3 bucket named satisfactory | |
# For exemple, you can use https://filebase.com/ | |
# You need s3cmd to be installed and configured: | |
# Installation: | |
# From the AUR: https://aur.archlinux.org/packages/s3cmd-git | |
# Otherwise, manual installation: | |
# wget https://github.com/s3tools/s3cmd/releases/download/v2.2.0/s3cmd-2.2.0.tar.gz | |
# tar -xzvf s3cmd-2.2.0.tar.gz | |
# cd s3cmd-2.2.0 | |
# sudo python3 ./setup.py install | |
# Configuration: | |
# Read https://docs.filebase.com/third-party-tools-and-clients/cli-tools/bash/backup-files-to-ipfs-with-bash#3.-next-configure-s3cmd-for-use-with-filebase | |
# Finally, to run the script: | |
# Launch the game as `<PATH_TO_SCRIPT> <WINEPREFIX> %command%` | |
# Prefix folder is the folder that contains `pfx` | |
# On steam: | |
# Put the command in the launch arguments | |
# Prefix is: `<STEAMFOLDER>/steamapps/compatdata/<APPID>` | |
PREFIX=$1 | |
SAVEDIR="$PREFIX/pfx/drive_c/users/steamuser/AppData/Local/FactoryGame/Saved/SaveGames" | |
shift | |
# Launch input command | |
"$@" | |
# Sync save files | |
if [ -d "$SAVEDIR" ]; then | |
notify-send "Syncing Satisfactory saves" | |
s3cmd sync "$SAVEDIR" "s3://satisfactory/SaveGames/" | |
notify-send "Finished syncing Satisfactory saves" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment