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
|
2023-07-11 23:50:05 +02:00
|
|
|
if [[ ! "${line}" =~ ^[[:space:]]*#.* ]] && [[ -n "${line}" ]]; then
|
2022-09-15 19:43:31 +02:00
|
|
|
flags+=("${line}")
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
|
|
|
|
exec /usr/bin/${electron} /usr/lib/${name}/app.asar "${flags[@]}" "$@"
|