# HG changeset patch # User Paul Boddie # Date 1461093657 -7200 # Node ID 35958ffd9f836627dd06d0708ddba1bc483bf3b0 # Parent e21b475d90f7c9a5a0fc78bab968e2621290a6e7 Added a comparison of files to determine whether new versions need installing. diff -r e21b475d90f7 -r 35958ffd9f83 tools/install.sh --- a/tools/install.sh Tue Apr 19 21:05:26 2016 +0200 +++ b/tools/install.sh Tue Apr 19 21:20:57 2016 +0200 @@ -66,13 +66,17 @@ fi if [ -e "$CONFIG_DIR/config.py" ]; then - mv "$INSTALL_DIR/imiptools/config.py" "$CONFIG_DIR/config.py.new" + if ! cmp "$INSTALL_DIR/imiptools/config.py" "$CONFIG_DIR/config.py" > /dev/null 2>&1 ; then + mv "$INSTALL_DIR/imiptools/config.py" "$CONFIG_DIR/config.py.new" + fi else mv "$INSTALL_DIR/imiptools/config.py" "$CONFIG_DIR/config.py" fi if [ -e "$CONFIG_DIR/config.sh" ]; then - cp "tools/config.sh" "$CONFIG_DIR/config.sh.new" + if ! cmp "tools/config.sh" "$CONFIG_DIR/config.sh" > /dev/null 2>&1 ; then + cp "tools/config.sh" "$CONFIG_DIR/config.sh.new" + fi else cp "tools/config.sh" "$CONFIG_DIR/config.sh" fi