Last active
September 21, 2022 20:30
-
-
Save DanBurkhardt/e9e457bf34435f8721fad198f39c77a8 to your computer and use it in GitHub Desktop.
A sync script example for Steam Deck that syncs game screenshots to a common directory, which is backed up to the the cloud (Synology Drive in my case).
This file contains hidden or 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 | |
# Licensed MIT, see bottom of file. | |
# setup vars | |
STEAM_USERID="YOUR_NUMERIC_USERID" | |
# Setup source directory vars | |
# Note: Games like AC Odyssey don't use the same sync dir so you have | |
# to sleuth in desktop mode to find the right directory | |
## Games | |
## Steam System Screenshots (steambutton + r2) | |
STEAM_SYSTEM_SS="/home/deck/.local/share/Steam/userdata/$STEAM_USERID/760/remote" | |
### No Mans Sky | |
NMS_SS_ORIGIN="/home/deck/.local/share/Steam/userdata/$STEAM_USERID/760/remote/275850/screenshots" | |
### AC Odyssey | |
AC_SS_ORIGIN="/home/deck/.steam/steam/steamapps/compatdata/812140/pfx/drive_c/users/steamuser/Documents/Assassin's Creed Odyssey/photos" | |
# Setup destination directories | |
## root dir for all screenshot sync folders | |
SYNC_DIR="/home/deck/Synology/Games/Steam Deck" | |
## actual source dirs | |
## note: this script assumes thes dirs already exist (runs naively) | |
STEAM_SYSTEM_DEST="$SYNC_DIR/Steam_System_Screenshots" | |
NMS_DEST="$SYNC_DIR/NoMansSky" | |
AC_DEST="$SYNC_DIR/AssasinsCreed_Odyssey" | |
# setup sync function | |
sync_ss() { | |
# sync origin to dest | |
rsync -a --no-times --checksum "$1" "$2" | |
} | |
# perform the sync for each game | |
# from source ss folder to dest | |
sync_ss "$STEAM_SYSTEM_SS" "$STEAM_SYSTEM_DEST" | |
sync_ss "$NMS_SS_ORIGIN" "$NMS_DEST" | |
sync_ss "$AC_SS_ORIGIN" "$AC_DEST" | |
# note: in my case I have synology to perform a sync task | |
# with this directory, but you may also use a network drive, | |
# external drive, Dropbox, or any other service to auto-transport | |
# your images to a place that is better for you to manage and share them. | |
# License: MIT | |
# Copyright 2022, Gigabitelabs | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal | |
# in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies | |
# of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | |
# | |
# The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | |
# | |
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | |
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, | |
# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Updated with path for screenshots taken with the the steam system capture feature:
steambutton + r2