Subversion Repositories lagranto.ecmwf

Rev

Rev 5 | Rev 11 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 5 Rev 9
Line 4... Line 4...
4
# Set some general parameters
4
# Set some general parameters
5
# -----------------------------------------------------------------------------
5
# -----------------------------------------------------------------------------
6
 
6
 
7
# Usage
7
# Usage
8
if ( $#argv == 0 ) then
8
if ( $#argv == 0 ) then
9
  echo "install.sh [lib|core|goodies|links|all|docu|clean] "
9
  echo "install.sh [lib|core|goodies|links|all|docu|clean|tag] "
10
  exit 0
10
  exit 0
11
endif
11
endif
12
 
12
 
13
# Set the mode
13
# Set the mode
14
set mode = $1
14
set mode = $1
15
 
15
 
-
 
16
# Set path to SVN repository
-
 
17
set svnpath=https://svn.iac.ethz.ch/pub/lagranto.ecmwf/
-
 
18
 
16
# Set paths for development and for synchronisation (operational)
19
# Set paths for development and for synchronisation (operational)
17
set path_devel = "${DYN_TOOLS}//lagranto.ecmwf/"
20
set path_devel = "${DYN_TOOLS}//lagranto.ecmwf/"
18
set path_sync  = "${DYN_TOOLS}/lagranto.ecmwf/"
21
set path_sync  = "${DYN_TOOLS}/lagranto/"
19
 
22
 
20
# Init Fortran compiler and set netCDF acccordingly
23
# Init Fortran compiler and set netCDF acccordingly
21
setenv FORTRAN pgf90 
24
setenv FORTRAN pgf90 
22
 
25
 
23
# Init netCDF library depending on the Fortran compiler
26
# Init netCDF library depending on the Fortran compiler
Line 38... Line 41...
38
  exit 1
41
  exit 1
39
 
42
 
40
endif
43
endif
41
 
44
 
42
# -----------------------------------------------------------------------------
45
# -----------------------------------------------------------------------------
-
 
46
# Create a new tag in SVN repository
-
 
47
# -----------------------------------------------------------------------------
-
 
48
 
-
 
49
if ( "${mode}" == "tag" ) then
-
 
50
   svn info
-
 
51
   if ( "${#argv}" != 2 ) then
-
 
52
     echo "Usage: install.csh tag id <id=tag number>"
-
 
53
   else
-
 
54
     set tagnr = $2
-
 
55
   endif
-
 
56
   svn copy ${svnpath}/trunk ${svnpath}/tags/${tagnr} -m "Release ${tagnr}"
-
 
57
   exit 0
-
 
58
endif
-
 
59
 
-
 
60
# -----------------------------------------------------------------------------
43
# Set internal parameters and detailed installation mode
61
# Set internal parameters and detailed installation mode
44
# -----------------------------------------------------------------------------
62
# -----------------------------------------------------------------------------
45
 
63
 
46
# Set LAGRANTO environment variable
64
# Set LAGRANTO environment variable
47
setenv LAGRANTO ${path_devel}
65
setenv LAGRANTO ${path_devel}
Line 89... Line 107...
89
if ( "${mode}" == "core"    ) goto modeok
107
if ( "${mode}" == "core"    ) goto modeok
90
if ( "${mode}" == "goodies" ) goto modeok
108
if ( "${mode}" == "goodies" ) goto modeok
91
if ( "${mode}" == "links"   ) goto modeok
109
if ( "${mode}" == "links"   ) goto modeok
92
if ( "${mode}" == "clean"   ) goto modeok
110
if ( "${mode}" == "clean"   ) goto modeok
93
if ( "${mode}" == "docu"    ) goto modeok
111
if ( "${mode}" == "docu"    ) goto modeok
-
 
112
if ( "${mode}" == "sync"    ) goto modeok
94
echo "Unsupported mode ${mode} ... Stop"
113
echo "Unsupported mode ${mode} ... Stop"
95
exit 1
114
exit 1
96
 
115
 
97
modeok:
116
modeok:
98
 
117
 
Line 423... Line 442...
423
 
442
 
424
# -----------------------------------------------------------------------------
443
# -----------------------------------------------------------------------------
425
# Synchronise ( development -> operational ) 
444
# Synchronise ( development -> operational ) 
426
# -----------------------------------------------------------------------------
445
# -----------------------------------------------------------------------------
427
 
446
 
428
if ( "${mode}" == "sync"  ) then
447
if ( ("${mode}" == "all" ) | ("${mode}" == "sync" )  ) then
429
 
448
 
430
echo
449
echo
431
echo "-----------------------------------------------------------------"
450
echo "-----------------------------------------------------------------"
432
echo "Sync ( development -> operational )"
451
echo "Sync ( lagranto.ecmwf -> lagranto )"
433
echo "-----------------------------------------------------------------"
452
echo "-----------------------------------------------------------------"
434
echo
453
echo
435
 
454
 
436
# Synchronize directories
-
 
437
rsync --delete -avz ${path_devel} ${path_sync}
-
 
438
 
-
 
439
# Set the correct path 
-
 
440
setenv LAGRANTO ${path_sync}
-
 
441
 
-
 
442
# Set the correct links
-
 
443
if ( ! -d ${LAGRANTO}/bin ) mkdir ${LAGRANTO}/bin
-
 
444
cd ${LAGRANTO}/bin
455
cd ${path_sync}/bin/
445
 
-
 
446
ln -svf ${LAGRANTO}/bin/lagranto            lagranto.sh
-
 
447
ln -svf ${LAGRANTO}/bin/lagranto            lagranto.ecmwf
-
 
448
ln -svf ${LAGRANTO}/bin/lagrantohelp        lagrantohelp.sh
-
 
449
ln -svf ${LAGRANTO}/bin/lagrantohelp        lagrantohelp.ecmwf
-
 
450
 
-
 
451
ln -svf ${LAGRANTO}/caltra/caltra.sh        caltra.sh
-
 
452
ln -svf ${LAGRANTO}/startf/create_startf.sh create_startf.sh
-
 
453
ln -svf ${LAGRANTO}/select/select.sh        select.sh
-
 
454
ln -svf ${LAGRANTO}/trace/trace.sh          trace.sh
-
 
455
ln -svf ${LAGRANTO}/density/density.sh      density.sh
-
 
456
ln -svf ${LAGRANTO}/startf/create_startf.sh startf.sh
-
 
457
ln -svf ${LAGRANTO}/lidar/lidar.sh          lidar.sh
-
 
458
 
456
 
459
ln -svf ${LAGRANTO}/caltra/caltra.sh        caltra.ecmwf
457
ln -svf ${path_devel}/bin/lagranto.sh            lagranto.ecmwf
460
ln -svf ${LAGRANTO}/startf/create_startf.sh create_startf.ecmwf
-
 
461
ln -svf ${LAGRANTO}/select/select.sh        select.ecmwf
-
 
462
ln -svf ${LAGRANTO}/trace/trace.sh          trace.ecmwf
458
ln -svf ${path_devel}/bin/lagrantohelp.sh        lagrantohelp.ecmwf
463
ln -svf ${LAGRANTO}/density/density.sh      density.ecmwf
-
 
464
ln -svf ${LAGRANTO}/startf/create_startf.sh startf.ecmwf
-
 
465
ln -svf ${LAGRANTO}/lidar/lidar.sh          lidar.ecmwf
-
 
466
 
459
 
467
ln -svf ${LAGRANTO}/caltra/caltra.sh        caltra
460
ln -svf ${path_devel}/caltra/caltra.sh           caltra.ecmwf
468
ln -svf ${LAGRANTO}/startf/create_startf.sh create_startf
461
ln -svf ${path_devel}/startf/create_startf.sh    create_startf.ecmwf
469
ln -svf ${LAGRANTO}/select/select.sh        select
462
ln -svf ${path_devel}/select/select.sh           select.ecmwf
470
ln -svf ${LAGRANTO}/trace/trace.sh          trace
463
ln -svf ${path_devel}/trace/trace.sh             trace.ecmwf
471
ln -svf ${LAGRANTO}/density/density.sh      density
464
ln -svf ${path_devel}/density/density.sh         density.ecmwf
472
ln -svf ${LAGRANTO}/startf/create_startf.sh startf
465
ln -svf ${path_devel}/startf/create_startf.sh    startf.ecmwf
473
ln -svf ${LAGRANTO}/lidar/lidar.sh          lidar
466
ln -svf ${path_devel}/lidar/lidar.sh             lidar.ecmwf
-
 
467
ln -svf ${path_devel}/lidar/seltra.sh            seltra.ecmwf
474
 
468
 
475
foreach tool ( $tools )
469
foreach tool ( $tools )
476
 
470
 
477
ln -svf ${LAGRANTO}/goodies/${tool}.sh     ${tool}.sh 
-
 
478
ln -svf ${LAGRANTO}/goodies/${tool}.sh     ${tool}.ecmwf
471
ln -svf ${path_devel}/goodies/${tool}.sh         ${tool}.ecmwf
479
ln -svf ${LAGRANTO}/goodies/${tool}.sh     ${tool} 
-
 
480
 
472
 
481
end
473
end
482
 
474
 
483
# Set all permissions
475
# Set all permissions
484
chmod -R og+rx ${path_sync}
476
chmod -R og+rx ${path_sync}/bin/
485
 
-
 
486
# Set link for create_startf / startf
-
 
487
ln -s ${LAGRANTO}/create_startf ${LAGRANTO}/startf
-
 
488
 
477
 
489
endif
478
endif
490
 
479
 
491
# -----------------------------------------------------------------------------
480
# -----------------------------------------------------------------------------
492
# Final tasks
481
# Final tasks