1.1 --- a/tools/install.sh Tue Apr 19 20:57:33 2016 +0200
1.2 +++ b/tools/install.sh Tue Apr 19 21:09:34 2016 +0200
1.3 @@ -61,39 +61,39 @@
1.4 fi
1.5
1.6 # Install the config module in a more appropriate location.
1.7 +# Create new versions of configuration files instead of overwriting.
1.8
1.9 if [ ! -e "$CONFIG_DIR" ]; then
1.10 mkdir -p "$CONFIG_DIR"
1.11 fi
1.12
1.13 if [ -e "$CONFIG_DIR/config.py" ]; then
1.14 - if [ ! -e "$CONFIG_DIR/config.py.backup" ]; then
1.15 - mv "$CONFIG_DIR/config.py" "$CONFIG_DIR/config.py.backup"
1.16 - fi
1.17 + mv "$INSTALL_DIR/imiptools/config.py" "$CONFIG_DIR/config.py.new"
1.18 +else
1.19 + mv "$INSTALL_DIR/imiptools/config.py" "$CONFIG_DIR/config.py"
1.20 fi
1.21
1.22 if [ -e "$CONFIG_DIR/config.sh" ]; then
1.23 - if [ ! -e "$CONFIG_DIR/config.sh.backup" ]; then
1.24 - mv "$CONFIG_DIR/config.sh" "$CONFIG_DIR/config.sh.backup"
1.25 - fi
1.26 + cp "tools/config.sh" "$CONFIG_DIR/config.sh.new"
1.27 +else
1.28 + cp "tools/config.sh" "$CONFIG_DIR/config.sh"
1.29 fi
1.30
1.31 # Replace the config module with a symbolic link.
1.32
1.33 -mv "$INSTALL_DIR/imiptools/config.py" "$CONFIG_DIR/"
1.34 ln -s "$CONFIG_DIR/config.py" "$INSTALL_DIR/imiptools/config.py"
1.35
1.36 -# Copy the config script.
1.37 -
1.38 -cp tools/config.sh "$CONFIG_DIR/"
1.39 -
1.40 # Copy related configuration files.
1.41
1.42 if [ ! -e "$CONFIG_DIR/postgresql" ]; then
1.43 mkdir -p "$CONFIG_DIR/postgresql"
1.44 fi
1.45
1.46 -cp conf/postgresql/schema.sql "$CONFIG_DIR/postgresql/"
1.47 +if [ -e "$CONFIG_DIR/postgresql/schema.sql" ]; then
1.48 + cp "conf/postgresql/schema.sql" "$CONFIG_DIR/postgresql/schema.sql.new"
1.49 +else
1.50 + cp "conf/postgresql/schema.sql" "$CONFIG_DIR/postgresql/schema.sql"
1.51 +fi
1.52
1.53 # Tools
1.54