summarylogtreecommitdiffstats
path: root/mihomo-party.sh
blob: 9e9acfb146f435ec38366b7825afd2864b1b43ac (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#!/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[@]} "$@"