Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100755 49 lines (43 sloc) 1.312 kb
ecde432 [wxhaskell-from-cvs @ 2003-07-13 21:18:59 by dleijen]
dleijen authored
1 #!/bin/sh
35f9000 [wxhaskell-from-cvs @ 2003-07-21 19:29:38 by dleijen]
dleijen authored
2
3 # default installation directory is the current directory.
ecde432 [wxhaskell-from-cvs @ 2003-07-13 21:18:59 by dleijen]
dleijen authored
4 installdir="`pwd`"
35f9000 [wxhaskell-from-cvs @ 2003-07-21 19:29:38 by dleijen]
dleijen authored
5
6 # parse command-line arguments
7 while : ; do
8 # put optional argument in the $arg variable
9 case "$1" in
10 -*=*) arg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
11 *) arg= ;;
12 esac
13
14 # match on the arguments
15 case "$1" in
16 "") break;;
17 -installdir=*|--installdir=*)
18 installdir="$arg";;
19 -?|--help)
20 echo "usage:"
21 echo " wxhaskell-register [--installdir=<dir>]"
22 exit 1;;
23 *) echo "error:" 1>&2
24 echo " Unknown option \"$1\"." 1>&2
25 echo "" 1>&2
26 echo "usage:" 1>&2
27 echo " wxhaskell-register [--installdir=<dir>]" 1>&2
28 echo "" 1>&2
29 exit 2;;
30 esac
31 shift
32 done
33
34
35 # test if package files are found.
36 if test ! -e "${installdir}/wxh.pkg"; then
37 echo "error: " 1>&2
38 echo " Unable to find: ${installdir}/wxh.pkg" 1>&2
39 echo " Please run this program from the wxHaskell installation directory" 1>&2
40 echo " or specify the installation directory on the command line." 1>&2
41 echo "" 1>&2
42 echo "usage:" 1>&2
43 echo " wxhaskell-register [--installdir=<dir>]" 1>&2
44 exit 2
45 fi
46
47 # register the packages.
ecde432 [wxhaskell-from-cvs @ 2003-07-13 21:18:59 by dleijen]
dleijen authored
48 env installdir=${installdir} ghc-pkg -u -i ${installdir}/wxh.pkg
49 env installdir=${installdir} ghc-pkg -u -i ${installdir}/wx.pkg
Something went wrong with that request. Please try again.