source: Sophya/trunk/SophyaLib/Mgr/tar_for_web.csh@ 3234

Last change on this file since 3234 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: 4.6 KB
RevLine 
[2271]1#!/bin/csh
2# - Avant toute chose, dans ce fichier:
3# 1-/ Mettre le bon numero de version: set VS = "V?.?"
4# 2-/ Mettre le bon TAG: set TAG = "V_???200?"
5# 2-/ Mettre le bon OSCC: set OSCC = "Linux-g++"
6# - Execution et creation du:
7# 1-/ Se placer dans ~/Planck/DPC: cd ~/Planck/DPC/.
8# (repertoire au dessus des repertoires/modules Sophya)
[2272]9# 2-/ ./Mgr/tar_for_web.csh
[2271]10#----------------------------------------------
[2318]11set VS = "V1.5"
12set TAG = "V_Dec2002"
[2271]13set OSCC = "Linux-g++"
14###set OSCC = "OSF1-cxx"
15#----------------------------------------------
16set sophyarep = ( \
17 BaseTools DemoPIApp Examples FitsIOServer HiStats IFFTW \
18 LinAlg Manual Mgr NTools PI PIext PIGcont \
19 PMixer PrgMap PrgUtil ProgPI \
20 Samba SkyMap SysTools SkyT SUtils TArray Tests \
21 XAstroPack XephemAstroLib \
22 modules \
23 )
24#----------------------------------------------
25
26#################################################
27###### Check des variables d'environnement ######
28#################################################
29foreach d ( $sophyarep )
30 if( ! -d $d ) then
31 echo repertoire `pwd`/$d inexistant
32 exit -1
33 endif
34end
[2437]35if( ! $?SOPHYABASEREP ) then
36 echo Precisez SOPHYABASEREP
[2271]37 exit -1
38endif
[2437]39if( ! -e $SOPHYABASEREP/Include ) then
40 echo Pas de repertoire $SOPHYABASEREP/Include
[2271]41 exit -1
42endif
[2437]43if( ! -e $SOPHYABASEREP/${OSCC} ) then
44 echo Pas de repertoire $SOPHYABASEREP/${OSCC}
[2271]45 exit -1
46endif
47foreach d ( Libs ShLibs Exec )
[2437]48 if( ! -d $SOPHYABASEREP/${OSCC}/$d ) then
49 echo repertoire $SOPHYABASEREP/${OSCC}/$d inexistant
[2271]50 exit -1
51 endif
52end
53if( ! $?EXTLIBDIR ) then
54 echo Precisez EXTLIBDIR
55 exit -1
56endif
57if( ! -e $EXTLIBDIR/Include ) then
58 echo Pas de repertoire $EXTLIBDIR/Include
59 exit -1
60endif
61if( ! -e $EXTLIBDIR/${OSCC} ) then
62 echo Pas de repertoire $EXTLIBDIR/${OSCC}
63 exit -1
64endif
65foreach d ( Libs ShLibs )
66 if( ! -d $EXTLIBDIR/${OSCC}/$d ) then
67 echo repertoire $EXTLIBDIR/${OSCC}/$d inexistant
68 exit -1
69 endif
70end
71set SYS = `echo $OSCC | awk -F"-" '{print $1}'`
72echo "SOURCE = " `pwd`
[2437]73echo "SOPHYABASEREP = " $SOPHYABASEREP
[2271]74echo "EXTLIBDIR = " $EXTLIBDIR
75echo "Version = " $VS
76echo "Tag = " $TAG
77echo "System-compil = " $OSCC
78echo "System = " $SYS
79
80###############################
81###### Repertoire tampon ######
82###############################
83if( $?TMPDIR ) then
84 set tmp = $TMPDIR/tar_for_web
85else
86 set tmp = /tmp/tar_for_web
87endif
88echo "tmp = " $tmp
89rm -rf $tmp
90mkdir $tmp
91if( $status != 0 ) then
92 echo impossible de creer le repertoire temporaire $tmp
93 exit -1
94endif
95mkdir $tmp/${VS}
96mkdir $tmp/ExtLibs
97
98############################
99###### Le Code Sophya ######
100############################
101echo '>>>>>>>>' Code de Sophya
102mkdir $tmp/${VS}/Src
103cat >! $tmp/${VS}/Src/COPYRIGHT <<EOF
104 ---------------------------------
105 SOPHYA ::
106 Version: ${VS} - ${TAG}
[2318]107 Copyright (C) 1998-2003
[2271]108 LAL / IN2P3-CNRS DAPNIA/SPP CEA
109 ---------------------------------
110EOF
111foreach d ( $sophyarep )
112 echo repertoire $d
113 tar -chf - $d |(cd $tmp/${VS}/Src/.; tar -xf -)
114 rm -rf $tmp/${VS}/Src/$d/CVS
115end
116pushd $tmp > /dev/null
117tar -cf sophya_src.tar ${VS}/Src
118rm -rf ${VS}/Src
119gzip -f sophya_src.tar
120popd > /dev/null
121
122##################################################
123###### Les librairies et executables Sophya ######
124##################################################
125echo '>>>>>>>>' Librairies et executables de Sophya
[2437]126pushd $SOPHYABASEREP > /dev/null
[2271]127tar -chf - Include |(cd $tmp/${VS}/.; tar -xf -)
128popd > /dev/null
[2437]129pushd $SOPHYABASEREP/${OSCC} > /dev/null
[2271]130tar -chf - Libs |(cd $tmp/${VS}/.; tar -xf -)
131tar -chf - ShLibs |(cd $tmp/${VS}/.; tar -xf -)
132tar -chf - Exec |(cd $tmp/${VS}/.; tar -xf -)
133popd > /dev/null
134pushd $tmp > /dev/null
135tar -cf sophya_${SYS}.tar ${VS}
136rm -rf ${VS}
137gzip -f sophya_${SYS}.tar
138popd > /dev/null
139
140########################################
141###### Les librairies exterieures ######
142########################################
143echo '>>>>>>>>' Librairies exterieures de Sophya
144pushd $EXTLIBDIR > /dev/null
145tar -chf - Include |(cd $tmp/ExtLibs/.; tar -xf -)
146popd > /dev/null
147pushd $EXTLIBDIR/${OSCC} > /dev/null
148tar -chf - Libs |(cd $tmp/ExtLibs/.; tar -xf -)
149tar -chf - ShLibs |(cd $tmp/ExtLibs/.; tar -xf -)
150popd > /dev/null
151pushd $tmp > /dev/null
152tar -cf sophya_extlibs_${SYS}.tar ExtLibs
153rm -rf ExtLibs
154gzip -f sophya_extlibs_${SYS}.tar
155popd > /dev/null
156
157####################
158###### Resume ######
159####################
160echo "---------------------------------------"
161du -sk $tmp/sophya*.tar.gz
162echo "---------------------------------------"
163ls -ltr $tmp/sophya*.tar.gz
164echo "---------------------------------------"
165
166exit 0
Note: See TracBrowser for help on using the repository browser.