/[PAMELA software]/quicklook/tof/install.sh
ViewVC logotype

Contents of /quicklook/tof/install.sh

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (show annotations) (download) (as text)
Thu Jun 15 12:47:32 2006 UTC (18 years, 5 months ago) by campana
Branch: MAIN
CVS Tags: v1r06, v1r04, v1r05, HEAD
Changes since 1.2: +0 -4 lines
File MIME type: application/x-sh
install.sh modified

1 #!/bin/bash --norc
2 THISDIR=`pwd`
3 if [ $# -gt 0 ]; then
4 I=1
5 NOENV=""
6 INDIR=""
7 YODA=""
8 while [ $I -le $# ]; do
9 if [ $I -eq 1 ]; then
10 INPUT=$1
11 fi
12 if [ $I -eq 2 ]; then
13 INPUT=$2
14 fi
15 if [ $I -eq 3 ]; then
16 INPUT=$3
17 fi
18 if [ $I -eq 4 ]; then
19 INPUT=$4
20 fi
21 if [ $I -eq 5 ]; then
22 INPUT=$5
23 fi
24 if [ $INPUT == "--clean" ]; then
25 echo ""
26 echo ""
27 echo "============= MAKE DISTCLEAN =================="
28 echo ""
29 make distclean
30 cd $THISDIR &>/dev/null
31 exit 0;
32 fi
33 if [ $INPUT == "--no-env" ]; then
34 NOENV="1"
35 fi
36 if [ $INPUT == "--help" ] || [ $INPUT == "-h" ]; then
37 echo ""
38 echo " Usage: ./install.sh [options] "
39 echo ""
40 echo " Options: "
41 echo ""
42 echo " --no-env : compile and install without PAMELA environmental setup. "
43 echo " In this case only standalone program will work and it will"
44 echo " not possible to use the ROOT macros (they will NOT be "
45 echo " installed). Notice that the executables will statically "
46 echo " If this option is set it is mandatory to give also"
47 echo " the --install-dir and --with-yoda options."
48 echo ""
49 echo " --install-dir=[directory] : the directory were to install programs."
50 echo " If not existing the following subdirectories will be created:"
51 echo " lib/ include/ calib/ doc/ bin/"
52 echo " To be able to use the compiled program you will need to add"
53 echo " the [directory]/lib/ directory to your ld.so.conf file or to"
54 echo " the LD_CONFIG_PATH environmental variable."
55 echo ""
56 echo " --with-yoda=[directory] : path to the YODA source. To compile"
57 echo " programs you need the YODA header files that must be found in"
58 echo " [directory]/include/yoda/ and the YODA library that must be in"
59 echo " [directory]/lib/ ."
60 echo ""
61 echo " To compile and install using the PAMELA environmental setup you do not"
62 echo " need any option and, if given, they will not be considered."
63 echo ""
64 echo ""
65 exit 0
66 fi
67 TEST=`echo $INPUT | sed 's/--install-dir=//g'`
68 if [ $TEST != $INPUT ]; then
69 INDIR=$TEST
70 fi
71 TEST=`echo $INPUT | sed 's/--with-yoda=//g'`
72 if [ $TEST != $INPUT ]; then
73 YODA=$TEST
74 fi
75 let I=$I+1
76 done
77 if [ $NOENV ]; then
78 if [ $YODA ]; then
79 if [ $INDIR ]; then
80 echo ""
81 echo " Compiling and installing software _WITHOUT_ environmental setup "
82 echo ""
83 echo " WARNING: only standalone programs will work "
84 echo ""
85 echo ""
86 rm -rf ${THISDIR}/target
87 mkdir ${THISDIR}/target
88 mkdir ${THISDIR}/target/macros
89 unset PAM_CCO
90 export PAM_CCO=1
91 unset PAM_YODA
92 export PAM_YODA=$INDIR
93 if [ $YODA ]; then
94 unset PAM_YODA
95 export PAM_YODA=$YODA
96 fi;
97 if [ ! -d $INDIR ]; then
98 mkdir $INDIR
99 fi
100 if [ ! -d $INDIR/bin/ ]; then
101 mkdir $INDIR/bin/
102 fi
103 unset PAM_BIN
104 export PAM_BIN=$INDIR/bin/
105 if [ ! -d $INDIR/lib/ ]; then
106 mkdir $INDIR/lib/
107 fi
108 unset PAM_LIB
109 export PAM_LIB=$INDIR/lib/
110 if [ ! -d $INDIR/include/ ]; then
111 mkdir $INDIR/include/
112 fi
113 unset PAM_INC
114 export PAM_INC=$INDIR/include/
115 if [ ! -d $INDIR/doc/ ]; then
116 mkdir $INDIR/doc/
117 fi
118 unset PAM_DOC
119 export PAM_DOC=$INDIR/doc/
120 fi
121 fi;
122 else
123 echo ""
124 echo " Compiling and installing software _USING_ the environmental setup "
125 fi;
126 else
127 echo ""
128 echo " Compiling and installing software _USING_ the environmental setup "
129 fi;
130 echo ""
131 echo " WARNING: you will need to add ${PAM_LIB} "
132 echo " to your LD_LIBRARY_PATH or to the /etc/ld.so.conf file"
133 echo " You may also want to add ${PAM_BIN} to your PATH "
134 echo ""
135 sleep 5
136 #
137 unset ARCH
138 export ARCH=`uname`
139 export THISDIR=`pwd`
140 export LD_LIBRARY_PATH==$LD_LIBRARY_PATH:$PAM_LIB:$PAM_YODA/lib:$ROOTSYS/lib
141 echo ""
142 echo ""
143 echo "============= COMPILING AND INSTALLING THE ToFQLOOK PACKAGE ================="
144 echo ""
145 make distclean all upgrade
146 cd $THISDIR &>/dev/null
147 #
148 rm -rf ${THISDIR}/target

  ViewVC Help
Powered by ViewVC 1.1.23