Projects
Extra
discord
disable-updates.sh
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File disable-updates.sh of Package discord
#!/bin/bash # Wrapper script to disable Discord's automatic updates # The main binary files of the Discord .tar.gz are in lib64/discord. # This wrapper script "disable-updates.sh" is renamed and installed in /usr/bin/discord and calls the main binary. # So the .desktop file calls the wrapper script instead of the main binary. # in the file $HOME/.config/discord/settings.json # if the setting SKIP_HOST_UPDATE does not exist add it # otherwise leave it untouched CONFIGFILE="$HOME/.config/discord/settings.json" EXE="$(dirname "$0")/../lib64/discord/discord" if [[ -x "$EXE" ]]; then if [[ -d "$HOME/.config" && ! -f "$CONFIGFILE" ]]; then mkdir -p "$HOME/.config/discord" printf '%s\n' '{"SKIP_HOST_UPDATE": true}' > "$CONFIGFILE" elif [[ -f "$CONFIGFILE" ]]; then ! grep -qF SKIP_HOST_UPDATE "$CONFIGFILE" && \ sed -i '/^{/s@$@\n "SKIP_HOST_UPDATE": true,@' "$CONFIGFILE" fi exec "$EXE" "$@" fi
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.