/[PAMELA software]/c3po/install.sh
ViewVC logotype

Annotation of /c3po/install.sh

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1.1.1 - (hide annotations) (download) (as text) (vendor branch)
Fri Jul 21 11:32:02 2006 UTC (18 years, 4 months ago) by pam-fi
Branch: C3PO, MAIN
CVS Tags: v1r00, v1r01, HEAD
Changes since 1.1: +0 -0 lines
File MIME type: application/x-sh
C3PO the Flight Data Converter

1 pam-fi 1.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 " search for the calibration files in the given path."
47     echo " If this option is set it is mandatory to give also"
48     echo " the --install-dir and --with-yoda options."
49     echo ""
50     echo " --install-dir=[directory] : the directory were to install programs."
51     echo " If not existing the following subdirectories will be created:"
52     echo " lib/ include/ calib/ doc/ bin/"
53     echo " To be able to use the compiled program you will need to add"
54     echo " the [directory]/lib/ directory to your ld.so.conf file or to"
55     echo " the LD_CONFIG_PATH environmental variable."
56     echo ""
57     echo " --with-yoda=[directory] : path to the YODA source. To compile"
58     echo " programs you need the YODA header files that must be found in"
59     echo " [directory]/include/yoda/ and the YODA library that must be in"
60     echo " [directory]/lib/ ."
61     echo ""
62     echo " To compile and install using the PAMELA environmental setup you do not"
63     echo " need any option and, if given, they will not be considered."
64     echo ""
65     echo ""
66     echo " >>>>> VERY IMPORTANT <<<<< "
67     echo ""
68     echo " in order to run C3PO it is necessary that DatrhVader it is installed previously"
69     echo " >>>>>>>>>>>>> <<<<<<<<<<<<< "
70     exit 0
71     fi
72     TEST=`echo $INPUT | sed 's/--install-dir=//g'`
73     if [ $TEST != $INPUT ]; then
74     INDIR=$TEST
75     fi
76     TEST=`echo $INPUT | sed 's/--with-yoda=//g'`
77     if [ $TEST != $INPUT ]; then
78     YODA=$TEST
79     fi
80     let I=$I+1
81     done
82     if [ $NOENV ]; then
83     if [ $YODA ]; then
84     if [ $INDIR ]; then
85     echo ""
86     echo " Compiling and installing software _WITHOUT_ environmental setup "
87     echo ""
88     echo " WARNING: only standalone programs will work "
89     echo ""
90     echo ""
91     rm -rf ${THISDIR}/target
92     mkdir ${THISDIR}/target
93     mkdir ${THISDIR}/target/macros
94     unset PAM_CCO
95     export PAM_CCO=1
96     unset PAM_MACROS
97     export PAM_MACROS=${THISDIR}/target/macros
98     unset PAM_YODA
99     export PAM_YODA=$INDIR
100     if [ $YODA ]; then
101     unset PAM_YODA
102     export PAM_YODA=$YODA
103     fi;
104     if [ ! -d $INDIR ]; then
105     mkdir $INDIR
106     fi
107     if [ ! -d $INDIR/bin/ ]; then
108     mkdir $INDIR/bin/
109     fi
110     unset PAM_BIN
111     export PAM_BIN=$INDIR/bin/
112     if [ ! -d $INDIR/lib/ ]; then
113     mkdir $INDIR/lib/
114     fi
115     unset PAM_LIB
116     export PAM_LIB=$INDIR/lib/
117     if [ ! -d $INDIR/include/ ]; then
118     mkdir $INDIR/include/
119     fi
120     unset PAM_INC
121     export PAM_INC=$INDIR/include/
122     if [ ! -d $INDIR/calib/ ]; then
123     mkdir $INDIR/calib/
124     fi
125     unset PAM_CALIB
126     export PAM_CALIB=$INDIR/calib/
127     if [ ! -d $INDIR/doc/ ]; then
128     mkdir $INDIR/doc/
129     fi
130     unset PAM_DOC
131     export PAM_DOC=$INDIR/doc/
132     fi
133     fi;
134     else
135     echo ""
136     echo " Compiling and installing software _USING_ the environmental setup "
137     fi;
138     else
139     echo ""
140     echo " Compiling and installing software _USING_ the environmental setup "
141     fi;
142     echo ""
143     echo " WARNING: you will need to add ${PAM_LIB} "
144     echo " to your LD_LIBRARY_PATH or to the /etc/ld.so.conf file"
145     echo " You may also want to add ${PAM_BIN} to your PATH "
146     echo ""
147     sleep 5
148     #
149     unset ARCH
150     export ARCH=`uname`
151     export THISDIR=`pwd`
152     export LD_LIBRARY_PATH==$LD_LIBRARY_PATH:$PAM_LIB:$PAM_YODA/lib:$ROOTSYS/lib
153     echo ""
154     echo ""
155     echo "============= COMPILING AND INSTALLING THE C3PO PACKAGE ================="
156     echo ""
157     make distclean all upgrade
158     cd $THISDIR &>/dev/null
159     #
160     rm -rf ${THISDIR}/target

  ViewVC Help
Powered by ViewVC 1.1.23