#!/bin/sh

defaultpath="/usr/share/games/lierolibre"

manualpath="false"

# We want to catch the no-inputfile-path case, and pass on everything else
# inputfile can be given via -f, --file, --file= or positional arg1

for arg in "$@"; do
	case "$arg" in
		-f|--file|--file=*)
			manualpath="true"
			;;
		-*)
			;;
		?*)
			manualpath="true"
			;;
	esac
done

if [ "x$manualpath" = xtrue ]; then
	exec /usr/lib/games/lierolibre/lierolibre "$@"
else
	exec /usr/lib/games/lierolibre/lierolibre "$defaultpath" "$@"
fi

