discord 0.0.20-1: new upstream version, add support for discord-flags.conf

This commit is contained in:
Zoddo 2022-09-15 19:43:31 +02:00
parent bcc0ab79b8
commit b5ef7d2c84
WARNING! Although there is a key with this ID in the database it does not verify this commit! This commit is SUSPICIOUS.
GPG key ID: 43E8D68722C7D376
3 changed files with 36 additions and 16 deletions

21
discord-launcher.sh Executable file
View file

@ -0,0 +1,21 @@
#!/usr/bin/bash
set -euo pipefail
name=discord
electron=@ELECTRON@
flags_file="${XDG_CONFIG_HOME:-$HOME/.config}/${name}-flags.conf"
declare -a flags
if [[ -f "${flags_file}" ]]; then
mapfile -t < "${flags_file}"
fi
for line in "${MAPFILE[@]}"; do
if [[ ! "${line}" =~ ^[[:space:]]*#.* ]]; then
flags+=("${line}")
fi
done
exec /usr/bin/${electron} /usr/lib/${name}/app.asar "${flags[@]}" "$@"