hscolour-wrapper 599 Bytes
Newer Older
erikd's avatar
erikd committed
1 2 3 4 5 6 7
#!/bin/sh

# A wrapper around the HsColour executable.

# If the real HsColour exists, run it.
if test -x dist/build/HsColour/HsColour ; then
	exec dist/build/HsColour/HsColour "$@"
8 9
elif test -x dist-ghc/build/HsColour/HsColour ; then
	exec dist-ghc/build/HsColour/HsColour "$@"
erikd's avatar
erikd committed
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
	fi

# If the real HsColour doesn't exist, at least do something sensible when
# asked for the version. haddock asks for version >= 1.8 so return 1.9.
case "$1" in
	-version|--version)
		echo 'HsColour 1.9'
		exit 0
		;;
	*)
		;;
	esac

# Should never get to here so exit with error.
echo "hscolour-wrapper : $@"
exit 1