imip-agent

Changeset

1131:35958ffd9f83
2016-04-19 Paul Boddie raw files shortlog changelog graph Added a comparison of files to determine whether new versions need installing.
tools/install.sh (file)
     1.1 --- a/tools/install.sh	Tue Apr 19 21:05:26 2016 +0200
     1.2 +++ b/tools/install.sh	Tue Apr 19 21:20:57 2016 +0200
     1.3 @@ -66,13 +66,17 @@
     1.4  fi
     1.5  
     1.6  if [ -e "$CONFIG_DIR/config.py" ]; then
     1.7 -    mv "$INSTALL_DIR/imiptools/config.py" "$CONFIG_DIR/config.py.new"
     1.8 +    if ! cmp "$INSTALL_DIR/imiptools/config.py" "$CONFIG_DIR/config.py" > /dev/null 2>&1 ; then
     1.9 +        mv "$INSTALL_DIR/imiptools/config.py" "$CONFIG_DIR/config.py.new"
    1.10 +    fi
    1.11  else
    1.12      mv "$INSTALL_DIR/imiptools/config.py" "$CONFIG_DIR/config.py"
    1.13  fi
    1.14  
    1.15  if [ -e "$CONFIG_DIR/config.sh" ]; then
    1.16 -    cp "tools/config.sh" "$CONFIG_DIR/config.sh.new"
    1.17 +    if ! cmp "tools/config.sh" "$CONFIG_DIR/config.sh" > /dev/null 2>&1 ; then
    1.18 +        cp "tools/config.sh" "$CONFIG_DIR/config.sh.new"
    1.19 +    fi
    1.20  else
    1.21      cp "tools/config.sh" "$CONFIG_DIR/config.sh"
    1.22  fi