mihomo-party/aur/mihomo-party-bin/mihomo-party.sh

13 lines
410 B
Bash
Raw Permalink Normal View History

2024-08-07 14:00:14 +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 /opt/mihomo-party/mihomo-party ${MIHOMO_PARTY_USER_FLAGS[@]} "$@"