forked from Plemya-x/alr-repo
discord draft
This commit is contained in:
21
discord-electron/discord-launcher.sh
Normal file
21
discord-electron/discord-launcher.sh
Normal file
@ -0,0 +1,21 @@
|
||||
#!/usr/bin/bash
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
name=@PKGNAME@
|
||||
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 ~/.npm/node_modules/electron/dist/electron /usr/lib/${name}/app.asar "${flags[@]}" "$@"
|
Reference in New Issue
Block a user