mihomo-party/aur/mihomo-party-electron/mihomo-party.sh

13 lines
406 B
Bash
Raw Permalink Normal View History

2024-08-08 10:09:38 +08:00
#!/usr/bin/bash
XDG_CONFIG_HOME=${XDG_CONFIG_HOME:-~/.config}
# Allow users to override command-line options
if [[ -f "${XDG_CONFIG_HOME}/mihomo-party-flags.conf" ]]; then
mapfile -t MIHOMO_PARTY_USER_FLAGS <<<"$(grep -v '^#' "${XDG_CONFIG_HOME}/mihomo-party-flags.conf")"
echo "User flags:" ${MIHOMO_PARTY_USER_FLAGS[@]}
fi
# Launch
exec electron /opt/mihomo-party ${MIHOMO_PARTY_USER_FLAGS[@]} "$@"