Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

executable file 48 lines (41 sloc) 1.219 kb
#!/bin/sh
# default installation directory
installdir="/usr/local/lib"
# parse command-line arguments
while : ; do
# put optional argument in the $arg variable
case "$1" in
-*=*) arg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
*) arg= ;;
esac
# match on the arguments
case "$1" in
"") break;;
-installdir=*|--installdir=*)
installdir="$arg";;
-?|--help)
echo "usage:"
echo " wxhaskell-register [--installdir=<dir>]"
exit 1;;
*) echo "error:" 1>&2
echo " Unknown option \"$1\"." 1>&2
echo "" 1>&2
echo "usage:" 1>&2
echo " wxhaskell-register [--installdir=<dir>]" 1>&2
echo "" 1>&2
exit 2;;
esac
shift
done
# test if package files are found.
if test ! -e "${installdir}/wxh.pkg"; then
echo "error: " 1>&2
echo " Unable to find: ${installdir}/wxh.pkg" 1>&2
echo " Please specify the installation directory on the command line." 1>&2
echo " For example: wxhaskell-register --installdir=/usr/local/lib" 1>&2
echo "" 1>&2
exit 2
fi
# register the packages.
env installdir=${installdir} ghc-pkg -u -i ${installdir}/wxcore.pkg
env installdir=${installdir} ghc-pkg -u -i ${installdir}/wx.pkg
Jump to Line
Something went wrong with that request. Please try again.