discord 0.0.20-1: new upstream version, add support for discord-flags.conf
This commit is contained in:
parent
bcc0ab79b8
commit
b5ef7d2c84
3 changed files with 36 additions and 16 deletions
21
discord-launcher.sh
Executable file
21
discord-launcher.sh
Executable 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[@]}" "$@"
|
Loading…
Add table
Add a link
Reference in a new issue