1 | #!/bin/csh
|
---|
2 | # Script d'installation PEIDA
|
---|
3 | # Version preliminaire - Reza 27/11/97 +cmv
|
---|
4 |
|
---|
5 | if( "$1" == "-h" ) then
|
---|
6 | echo "install_peida <-s repertoire source> <-d repertoire destination>"
|
---|
7 | echo " [-m nom_machine-compilateur]"
|
---|
8 | if($?DPCDEVREP) then
|
---|
9 | echo " - defaut repertoire source: $DPCDEVREP"
|
---|
10 | else
|
---|
11 | echo " pas de defaut donnez explicitement le repertoire source"
|
---|
12 | endif
|
---|
13 | if($?DPCBASEREP) then
|
---|
14 | echo " - defaut repertoire destination: $DPCBASEREP"
|
---|
15 | else
|
---|
16 | echo " pas de defaut donnez explicitement le repertoire destination"
|
---|
17 | endif
|
---|
18 | echo " - possibilites nom_machine-compilateur"
|
---|
19 | echo " [AIX-xlC AIX-g++ HP-UX-aCC HP-UX-g++ OSF1-cxx OSF1-g++ Linux-g++ ...]"
|
---|
20 | if($?EROSCXX) then
|
---|
21 | echo " defaut: `uname`-$EROSCXX"
|
---|
22 | else
|
---|
23 | echo " pas de defaut donnez explicitement nom_machine-compilateur"
|
---|
24 | endif
|
---|
25 | exit -1
|
---|
26 | endif
|
---|
27 |
|
---|
28 | unset srcdir
|
---|
29 | unset dstdir
|
---|
30 | unset macomp
|
---|
31 |
|
---|
32 | while( $#argv > 1 )
|
---|
33 | if( "$1" == "-s" ) then
|
---|
34 | set srcdir = $2
|
---|
35 | endif
|
---|
36 | if( "$1" == "-d" ) then
|
---|
37 | set dstdir = $2
|
---|
38 | endif
|
---|
39 | if( "$1" == "-m" ) then
|
---|
40 | set macomp = $2
|
---|
41 | endif
|
---|
42 | shift
|
---|
43 | shift
|
---|
44 | end
|
---|
45 |
|
---|
46 | if( ! $?srcdir && $?DPCDEVREP ) then
|
---|
47 | echo "defaut srcdir set to DPCDEVREP"
|
---|
48 | set srcdir = $DPCDEVREP
|
---|
49 | endif
|
---|
50 | if( ! $?dstdir && $?DPCBASEREP ) then
|
---|
51 | echo "defaut dstdir set to DPCBASEREP"
|
---|
52 | set dstdir = $DPCBASEREP
|
---|
53 | endif
|
---|
54 | if( ! $?macomp && $?EROSCXX ) then
|
---|
55 | echo "defaut macomp set to uname-EROSCXX"
|
---|
56 | set macomp = `uname`-$EROSCXX
|
---|
57 | endif
|
---|
58 |
|
---|
59 | if( ! $?srcdir || ! $?dstdir || ! $?macomp ) then
|
---|
60 | echo "precisez ce que vous voulez:"
|
---|
61 | echo srcdir=$?srcdir dstdir=$?dstdir macomp=$?macomp
|
---|
62 | exit -1
|
---|
63 | else
|
---|
64 | set SRC = $srcdir/$macomp
|
---|
65 | set DST = $dstdir/$macomp
|
---|
66 | echo "************** PEIDA_Install script : ****************** "
|
---|
67 | echo "copie de $srcdir"
|
---|
68 | echo " vers $dstdir pour $macomp"
|
---|
69 | echo " pour $macomp"
|
---|
70 | # echo "SRC= $SRC , DST= $DST"
|
---|
71 | echo "********************************************************"
|
---|
72 | endif
|
---|
73 |
|
---|
74 | #set DO = echo
|
---|
75 | set DO =
|
---|
76 |
|
---|
77 | # d'abord les includes
|
---|
78 | #foreach d ( Include Include/tnt Include/CInc Include/SystCxx Include/Syst )
|
---|
79 | foreach d ( Include Include/tnt Include/CInc Include/Syst )
|
---|
80 | echo "PEIDA_Install: Installing $d ... "
|
---|
81 | if( ! -e $srcdir/$d ) then
|
---|
82 | echo "rep. inexistant: $SRC/$d"
|
---|
83 | else if( ! -e $dstdir/$d ) then
|
---|
84 | echo "rep. inexistant: $DST/$d"
|
---|
85 | else
|
---|
86 | cd $srcdir/$d
|
---|
87 | $DO cp * $dstdir/$d/.
|
---|
88 | $DO chmod -R a+r $dstdir/$d/
|
---|
89 | endif
|
---|
90 | end
|
---|
91 |
|
---|
92 | # puis le reste
|
---|
93 | foreach d ( Libs ShLibs Exec )
|
---|
94 | echo "PEIDA_Install: Installing $d ... "
|
---|
95 | if( ! -e $SRC/$d ) then
|
---|
96 | echo "rep. inexistant: $SRC/$d"
|
---|
97 | else if( ! -e $DST/$d ) then
|
---|
98 | echo "rep. inexistant: $DST/$d"
|
---|
99 | else
|
---|
100 | if( "$d" == "Exec" ) then
|
---|
101 | foreach f ( tobjio tspm tspm2 piapp )
|
---|
102 | if( -e $SRC/$d/$f ) then
|
---|
103 | $DO cp $SRC/$d/$f $DST/$d/.
|
---|
104 | endif
|
---|
105 | end
|
---|
106 | $DO chmod -R a+x $DST/$d/
|
---|
107 | else
|
---|
108 | cd $SRC/$d/.
|
---|
109 | $DO cp * $DST/$d/.
|
---|
110 | endif
|
---|
111 | $DO chmod -R a+r $DST/$d/
|
---|
112 | endif
|
---|
113 | end
|
---|
114 |
|
---|
115 | echo 'PEIDA_Install complete'
|
---|
116 |
|
---|
117 | exit 0
|
---|