Debian Codegraph @

bin/deploy

raw
1 #!/bin/sh
2 #
3 # Copyright by the Board of Trustees of the University of Illinois.
4 # All rights reserved.
5 #
6 # This file is part of HDF. The full HDF copyright notice, including
7 # terms governing use, modification, and redistribution, is contained in
8 # the files COPYING. COPYING can be found at the root
9 # of the source code distribution tree. If you do not have
10 # access to the file, you may request a copy from [email protected].
11 #
12 # Deploy the HDF4 binary.
13 #
14 # Programmer: Albert Cheng
15 # Created Date: 2005/04/07
16 #
17 # Modifications
18
19 # Function definitions
20 #
21 # Print Usage page
22 USAGE()
23 {
24 cat << EOF
25 Usage: $0 <dir>
26 Install the binary to directory <dir>
27
28 Examples:
29
30 $ bin/deploy /usr/local/hdf4
31 ....
32
33 EOF
34
35 }
36
37
38 # Variables
39
40 if [ $# != 1 ]; then
41 USAGE
42 exit 1
43 fi
44
45 installdir=$1
46 # create installdir if it does not exist yet.
47 if [ -d $installdir ] || mkdir $installdir ; then
48 ${MAKE:-gmake} install prefix=$installdir && \
49 ( cd $installdir/bin; ./h4redeploy -force)
50 exit $?
51 else
52 echo $installdir is not a valid directory
53 USAGE
54 exit 1
55 fi
56