mirror of
https://github.com/pompurin404/mihomo-party.git
synced 2024-12-25 11:54:34 +08:00
13 lines
406 B
Bash
13 lines
406 B
Bash
#!/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[@]} "$@"
|