837f43b9c1d064b8bfc94e49162d355162e2e4b1
max
  Tue Jun 24 05:43:26 2014 -0700
previous commit did just update the file, now really adding the -uoption to rsync, refs #13049, note 46

diff --git src/browserbox/root/updateBrowser.sh src/browserbox/root/updateBrowser.sh
index 5dec563..323fdd7 100755
--- src/browserbox/root/updateBrowser.sh
+++ src/browserbox/root/updateBrowser.sh
@@ -13,53 +13,57 @@
 # - if a script named updateBrowser.sh already is running
 # - any hgMirror jobs are running
 # - if a flagFile on hgDownload is not more recent than a local flag file
 
 
 
 # rsync options:
 # t = preserve time
 # l = preserve symlinks
 # p = preserve permissions
 # r = recurse
 # v = verbose
 # z = compress
 # P = permit partial download (for restart)
 # h = human readable
-RSYNCOPTS="-ltrzvh"
+# u = skip if file is newer on receiver
+RSYNCOPTS="-ltrzvhu"
 # rsync server for CGIs and html files
 RSYNCSRC="rsync://hgdownload.cse.ucsc.edu"
 RSYNCCGIBIN=cgi-bin
 RSYNCHTDOCS=htdocs
 
 # check if running as root
 if [ "$(id -u)" != "0" ] ; then
    echo "This script must be run as root" 1>&2
    exit 1
 fi
 
 # check flag if run with no parameter (=from cron)
 if [ "$#" -eq 0 ] ; then
    # check a flag file to see if anything on hgdownload actually changed
    if /root/urlIsNotNewerThanFile http://hgdownload.cse.ucsc.edu/gbib/lastUpdate /root/lastUpdateTime.flag
    then
        exit 0
    fi
 fi
 
 # use the right update script, depending on version
 if [ "$1" == "alpha" -o "$1" == "beta" -o "$1" == "devbox" ] ; then
+    # the alpha/beta/devbox states always overwrite even if files are newer
+    # note the missing -u option
+    RSYNCOPTS="-ltrzvh"
     UPDATEBASE=http://hgwdev.soe.ucsc.edu/gbib
 else
     UPDATEBASE=http://hgdownload.cse.ucsc.edu/gbib
 fi
 
 # unless already calling self, update self and call self
 if [ "$BASH_ARGV" != "noUpdate" ] ; then
     echo getting new update script
     wget $UPDATEBASE/updateBrowser.sh -O /root/updateBrowser.sh -q
     sudo /root/updateBrowser.sh $1 noUpdate
     exit 0
 fi
 
 # check if running already, 3 = the main script + its update + the outer shell
 RUNNING=`ps --no-headers -CupdateBrowser.sh | wc -l`