#!/bin/sh
# fizz-posix - dispatch to fizz-mount or fizz-serve based on first argument.
# Looks for the binaries in the same directory as this script.
dir="$(dirname "$0")"

case "$1" in
	mount)
		shift
		exec "$dir/fizz-mount" "$@"
		;;
	serve)
		shift
		exec "$dir/fizz-serve" "$@"
		;;
	*)
		echo "fizz $("$dir/fizz-serve" --version)" >&2
		echo "Usage: fizz mount HOST[:PORT] MOUNTPOINT [--omithidden] [fuse-options]" >&2
		echo "       fizz serve [--readonly] [--interface ADDR] [ROOTDIR [PORT]]" >&2
		exit 1
		;;
esac
