/[xulu]/trunk/initXulu.sh
ViewVC logotype

Annotation of /trunk/initXulu.sh

Parent Directory Parent Directory | Revision Log Revision Log


Revision 11 - (hide annotations)
Wed Feb 25 21:31:59 2009 UTC (15 years, 9 months ago) by mojays
File MIME type: application/x-sh
File size: 5010 byte(s)
new initXulu.sh
1 mojays 11 #!/bin/bash
2     #############################################################################
3     # XULU Init Script - This file is part of the eXtendable Unified Land Use
4     # Modelling Platform (XULU)
5     #############################################################################
6     #
7     #    This library is free software; you can redistribute it and/or modify it
8     # under the terms of the GNU Lesser General Public License as published by the
9     # Free Software Foundation; either version 2.1 of the License, or (at your
10     # option) any later version.
11     #    This library is distributed in the hope that it will be useful, but
12     # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13     # FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
14     # for more details.
15     #    You should have received a copy of the GNU Lesser General Public License
16     # along with this library; if not, write to the Free Software Foundation, Inc.,
17     # 51 Franklin St, Fifth Floor, Boston, MA 02110, USA
18     #
19     #    Diese Bibliothek ist freie Software; Sie dürfen sie unter den Bedingungen
20     # der GNU Lesser General Public License, wie von der Free Software Foundation
21     # veröffentlicht, weiterverteilen und/oder modifizieren; entweder gemäß Version
22     # 2.1 der Lizenz oder (nach Ihrer Option) jeder späteren Version.
23     #    Diese Bibliothek wird in der Hoffnung weiterverbreitet, daß sie nützlich
24     # sein wird, jedoch OHNE IRGENDEINE GARANTIE, auch ohne die implizierte Garantie
25     # der MARKTREIFE oder der VERWENDBARKEIT FÜR EINEN BESTIMMTEN ZWECK. Mehr
26     # Details finden Sie in der GNU Lesser General Public License.
27     #    Sie sollten eine Kopie der GNU Lesser General Public License zusammen mit
28     # dieser Bibliothek erhalten haben; falls nicht, schreiben Sie an die Free
29     # Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA.
30     #
31     #
32     #
33     #
34     #
35     # =====================================================================
36     # Initializes the XULU folder structure after the first SVN checkout
37     # by copying default configuration files from the "defaults" folder
38     # to their expected location.
39     #
40     # The default behavior is only to copy non-existing files. If you
41     # want to reset you configuration (in case of a partially
42     # deleted or damaged configuration) you can use the command parameter
43     # "--init" to overwrite all files with their defaults.
44     #
45     # Summary:
46     # - copy "DefaultProperties" to main folder
47     # - copy Eclipse configuration to main folder
48     # - .classpath
49     # - .project
50     # - copy "startXulu.bat/sh" to main folder
51     # - copy XULU registry files to main folder
52     # - registry.xif
53     # - registry_arrayGrid.xif
54     # - registry_ProxyGrid.xif
55     # - XULU plugin configurations
56     # - plugin\GeoModelCodeGenerator\* to plugin folder
57     # - plugin\GTVisualisationColorMapPlugin\* to plugin folder
58     # - plugin\LoggerPlugin\* to plugin folder
59     # - plugin\RasterCalculator\* to plugin folder
60     # =====================================================================
61    
62     # Folder where to find the defaults
63     SOURCE_DIR=defaults
64    
65     COPY_PARAM="-i"
66     OK="sd"
67     if [ "$1" == "--init" ]; then COPY_PARAM="-f" ; fi
68     echo initXulu.sh [--init]
69     echo --init Reset and overwrite all XULU configuration files without asking
70     echo
71     echo
72    
73     echo XULU settings will be reset with defaults now.
74    
75    
76     echo DefaultProperties
77     cp $COPY_PARAM $SOURCE_DIR/DefaultProperties .
78     cp $COPY_PARAM $SOURCE_DIR/XuluProperties .
79    
80     echo Eclipse configuration
81     cp -i $COPY_PARAM $SOURCE_DIR/.classpath .
82     cp -i $COPY_PARAM $SOURCE_DIR/.project .
83    
84     echo Start scripts: startXulu.bat + startXulu.sh
85     cp $COPY_PARAM $SOURCE_DIR/startXULU.sh .
86     chmod +x startXULU.sh
87     cp $COPY_PARAM $SOURCE_DIR/startXULU.bat .
88    
89     echo sample XULU registry files
90     cp $COPY_PARAM $SOURCE_DIR/registry.xif .
91     cp $COPY_PARAM $SOURCE_DIR/registry_arrayGrid.xif .
92     cp $COPY_PARAM $SOURCE_DIR/registry_ProxyGrid.xif .
93    
94     echo Plugin folder
95     mkdir plugin &> /dev/null
96     echo Template files for GeoModelCodeGenerator plugin
97     DDIR=plugin/GeoModelCodeGenerator
98     SDIR=$SOURCE_DIR/$DDIR
99     mkdir $DDIR &> /dev/null
100     cp $COPY_PARAM $SDIR/ModelContentManager.tpl $DDIR
101     cp $COPY_PARAM $SDIR/StepModel.tpl $DDIR
102     cp $COPY_PARAM $SDIR/XuluModel.tpl $DDIR
103    
104     echo Template files for GTVisualisationColorMapPlugin
105     DDIR=plugin/GTVisualisationColorMapPlugin
106     SDIR=$SOURCE_DIR/$DDIR
107     mkdir $DDIR &> /dev/null
108     cp $COPY_PARAM $SDIR/gtcolormaps.xif $DDIR
109    
110     echo Template files for LoggerPlugin
111     DDIR=plugin/LoggerPlugin
112     SDIR=$SOURCE_DIR/$DDIR
113     mkdir $DDIR &> /dev/null
114     cp $COPY_PARAM $SDIR/log4j.cfg $DDIR
115    
116     echo Template files for LoggerPlugin
117     DDIR=plugin/RasterCalculator
118     SDIR=$SOURCE_DIR/$DDIR
119     mkdir $DDIR &> /dev/null
120     cp $COPY_PARAM $SDIR/default_filter.inp $DDIR
121    
122     echo Finished.
123     echo
124    

root@scm.wald.intevation.org
ViewVC Help
Powered by ViewVC 1.1.26