2022-09-15 19:43:31 +02:00
|
|
|
#!/usr/bin/bash
|
|
|
|
|
|
|
|
set -euo pipefail
|
|
|
|
|
2022-12-10 12:07:22 +01:00
|
|
|
name=@PKGNAME@
|
2022-09-15 19:43:31 +02:00
|
|
|
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[@]}" "$@"
|