Skip to content

Instantly share code, notes, and snippets.

@axxapy
Last active January 7, 2022 23:42
Show Gist options
  • Save axxapy/f572b105617876d027e7d590d79e74a1 to your computer and use it in GitHub Desktop.
Save axxapy/f572b105617876d027e7d590d79e74a1 to your computer and use it in GitHub Desktop.
Disables steam auto update for all installed games (linux)
#!/bin/bash
# https://www.cyberciti.biz/faq/how-to-use-sed-to-find-and-replace-text-in-files-in-linux-unix-shell/
STEAM_PATH="$HOME/.local/share/Steam"
LIBS=($(cat "$STEAM_PATH/config/libraryfolders.vdf" | grep '"path"' | sed s/\"path\"//g | sed s/\"//g))
for LIB_DIR in ${LIBS[@]}; do
GAMES=($(ls -1 "$LIB_DIR"/steamapps/appmanifest_*.acf))
for FILE in ${GAMES[@]}; do
sed -i -r "s/\"AutoUpdateBehavior\"(\\s*)\"0\"/\"AutoUpdateBehavior\"\1\"1\"/g" "$FILE"
done
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment