view build-aux/move-if-change @ 20539:b6ae0ef9327e

Display bottom Qt statusbar on figure based on "toolbar" property (bug #46025). * Figure.cc (Figure): Adjust bottom of window height (boffset) if m_statusBar is visible. Use m_statusBar->hide() to hide bottom status bar when "toolbar" property is "none". * Figure.cc (showFigureToolbar): Also show or hide m_statusBar widget based on "toolbar" property.
author Rik <rik@octave.org>
date Tue, 22 Sep 2015 09:41:13 -0700
parents 5e50f25f245a
children
line wrap: on
line source

#!/bin/sh
#
# Like mv $1 $2, but if the files are the same, just delete $1.
# Status is 0 if $2 is changed, 1 otherwise.

if test -r $2; then
  if cmp $1 $2 > /dev/null; then
    echo $2 is unchanged 1>&2
    rm -f $1
  else
    mv -f $1 $2
  fi
else
  mv -f $1 $2
fi