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