5505d9db4a
Resources are moved to a "resources" subdirectory to allow automated asar installers to work with this package. Reported-by: irisnk (https://aur.archlinux.org/packages/discord_arch_electron#comment-937014)
21 lines
453 B
Bash
Executable file
21 lines
453 B
Bash
Executable file
#!/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:]]*#.* ]] && [[ -n "${line}" ]]; then
|
|
flags+=("${line}")
|
|
fi
|
|
done
|
|
|
|
exec /usr/bin/${electron} /usr/lib/${name}/resources/app.asar "${flags[@]}" "$@"
|