# vim: set ft=sh: ts=4:
# This is Alpine's replacement for gitstatus' install script that just executes
# gitstatusd installed in /usr/libexec.

_gitstatus_install_main() {
	local daemon=${GITSTATUS_DAEMON:-"/usr/libexec/gitstatusd"}

	while [ $# -gt 0 ]; do
		case "$1" in
			--) shift; break;;
			*) shift;;
		esac
	done

	if [ $# -ne 0 ]; then
		"$@" "$daemon" "$("$daemon" --version)" 0
	fi
}

_gitstatus_install_main "$@"
