| [968] | 1 | #!/bin/csh
 | 
|---|
 | 2 | #  Script d'installation SOPHYA 
 | 
|---|
 | 3 | #  Version preliminaire - Reza 27/11/97 +cmv
 | 
|---|
 | 4 | 
 | 
|---|
 | 5 | if( "$1" == "-h" ) then
 | 
|---|
 | 6 |   echo "install_sophya <-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 "************** 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 "********************************************************"
 | 
|---|
 | 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/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
 | 
|---|
 | 95 | end
 | 
|---|
 | 96 | 
 | 
|---|
 | 97 | # puis le reste
 | 
|---|
 | 98 | foreach 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
 | 
|---|
| [1587] | 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/.
 | 
|---|
| [968] | 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
 | 
|---|
 | 120 | end
 | 
|---|
 | 121 | 
 | 
|---|
 | 122 | echo 'SOPHYA_Install complete'
 | 
|---|
 | 123 | 
 | 
|---|
 | 124 | exit 0
 | 
|---|