source: Sophya/trunk/SophyaLib/Mgr/install_sophya@ 3664

Last change on this file since 3664 was 2437, checked in by cmv, 22 years ago

chgt DPC...REP en SOPHYA...REP et EROSCXX en SOPHYACXX cmv 17/09/2003

  • Property svn:executable set to *
File size: 3.1 KB
Line 
1#!/bin/csh
2# Script d'installation SOPHYA
3# Version preliminaire - Reza 27/11/97 +cmv
4
5if( "$1" == "-h" ) then
6 echo "install_sophya <-s repertoire source> <-d repertoire destination>"
7 echo " [-m nom_machine-compilateur]"
8 if($?SOPHYADEVREP) then
9 echo " - defaut repertoire source: $SOPHYADEVREP"
10 else
11 echo " pas de defaut donnez explicitement le repertoire source"
12 endif
13 if($?SOPHYABASEREP) then
14 echo " - defaut repertoire destination: $SOPHYABASEREP"
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($?SOPHYACXX) then
21 echo " defaut: `uname`-$SOPHYACXX"
22 else
23 echo " pas de defaut donnez explicitement nom_machine-compilateur"
24 endif
25 exit -1
26endif
27
28unset srcdir
29unset dstdir
30unset macomp
31
32while( $#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
44end
45
46if( ! $?srcdir && $?SOPHYADEVREP ) then
47 echo "defaut srcdir set to SOPHYADEVREP"
48 set srcdir = $SOPHYADEVREP
49endif
50if( ! $?dstdir && $?SOPHYABASEREP ) then
51 echo "defaut dstdir set to SOPHYABASEREP"
52 set dstdir = $SOPHYABASEREP
53endif
54if( ! $?macomp && $?SOPHYACXX ) then
55 echo "defaut macomp set to uname-SOPHYACXX"
56 set macomp = `uname`-$SOPHYACXX
57endif
58
59if( ! $?srcdir || ! $?dstdir || ! $?macomp ) then
60 echo "precisez ce que vous voulez:"
61 echo srcdir=$?srcdir dstdir=$?dstdir macomp=$?macomp
62 exit -1
63else
64 set SRC = $srcdir/$macomp
65 set DST = $dstdir/$macomp
66 echo "************** SOPHYA_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 "********************************************************"
72endif
73
74#set DO = echo
75set DO =
76
77# d'abord les includes
78#foreach d ( Include Include/tnt Include/CInc Include/SystCxx Include/Syst )
79foreach d ( Include Include/ArchTOI )
80 echo "SOPHYA_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# endif
86 else
87 if( ! -e $dstdir/$d ) then
88 echo "rep. inexistant: $dstdir/$d -> mkdir"
89 mkdir $dstdir/$d
90 endif
91 cd $srcdir/$d
92 $DO cp * $dstdir/$d/
93 $DO chmod -R a+r $dstdir/$d/
94 endif
95end
96
97# puis le reste
98foreach d ( Libs ShLibs Exec )
99 echo "SOPHYA_Install: Installing $d ... "
100 if( ! -e $SRC/$d ) then
101 echo "rep. inexistant: $SRC/$d"
102 else if( ! -e $DST/$d ) then
103 echo "rep. inexistant: $DST/$d"
104 else
105 if( "$d" == "Exec" ) then
106# foreach f ( scanppf tobjio tspm tspm2 spiapp tgsky tgrsr skymixer )
107# if( -e $SRC/$d/$f ) then
108# $DO cp $SRC/$d/$f $DST/$d/.
109# endif
110# end
111 cd $SRC/$d/.
112 $DO cp * $DST/$d/.
113 $DO chmod -R a+x $DST/$d/
114 else
115 cd $SRC/$d/.
116 $DO cp * $DST/$d/.
117 endif
118 $DO chmod -R a+r $DST/$d/
119 endif
120end
121
122echo 'SOPHYA_Install complete'
123
124exit 0
Note: See TracBrowser for help on using the repository browser.