# HG changeset patch # User Paul Boddie # Date 1461092726 -7200 # Node ID e21b475d90f7c9a5a0fc78bab968e2621290a6e7 # Parent 703152b277d097217dea2b96c5fd6ec8743b099f Make new versions of configuration files rather than overwriting existing ones. diff -r 703152b277d0 -r e21b475d90f7 tools/install.sh --- a/tools/install.sh Mon Apr 18 21:26:12 2016 +0200 +++ b/tools/install.sh Tue Apr 19 21:05:26 2016 +0200 @@ -59,32 +59,28 @@ fi # Install the config module in a more appropriate location. +# Create new versions of configuration files instead of overwriting. if [ ! -e "$CONFIG_DIR" ]; then mkdir -p "$CONFIG_DIR" fi if [ -e "$CONFIG_DIR/config.py" ]; then - if [ ! -e "$CONFIG_DIR/config.py.backup" ]; then - mv "$CONFIG_DIR/config.py" "$CONFIG_DIR/config.py.backup" - fi + mv "$INSTALL_DIR/imiptools/config.py" "$CONFIG_DIR/config.py.new" +else + mv "$INSTALL_DIR/imiptools/config.py" "$CONFIG_DIR/config.py" fi if [ -e "$CONFIG_DIR/config.sh" ]; then - if [ ! -e "$CONFIG_DIR/config.sh.backup" ]; then - mv "$CONFIG_DIR/config.sh" "$CONFIG_DIR/config.sh.backup" - fi + cp "tools/config.sh" "$CONFIG_DIR/config.sh.new" +else + cp "tools/config.sh" "$CONFIG_DIR/config.sh" fi # Replace the config module with a symbolic link. -mv "$INSTALL_DIR/imiptools/config.py" "$CONFIG_DIR/" ln -s "$CONFIG_DIR/config.py" "$INSTALL_DIR/imiptools/config.py" -# Copy the config script. - -cp tools/config.sh "$CONFIG_DIR/" - # Tools TOOLS="fix.sh init.sh init_user.sh make_freebusy.py update_quotas.py update_scheduling_modules.py"