From 3d1f9c4763bdeb36a2d5d1a7b084432140a47306 Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Fri, 20 Apr 2012 22:13:03 +0300 Subject: [PATCH] Enable setting rsync output directory on command line --- wwwtools/update-nls-www | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/wwwtools/update-nls-www b/wwwtools/update-nls-www index 354d6a2..f7a5f29 100755 --- a/wwwtools/update-nls-www +++ b/wwwtools/update-nls-www @@ -13,11 +13,22 @@ set -ex MYDIR=$(cd $(dirname $0) && pwd) WEBDIR=$MYDIR/../../htwork CVSDIR=$(cd $MYDIR/../../cvs && pwd) +output_dir=~/htdocs GMAKE=make which gmake >/dev/null && GMAKE=gmake export GMAKE +TEMP=$(getopt o: "$@") +eval set -- "$TEMP" + +while true; do + case $1 in + -o) output_dir=$2; shift; shift;; + --) shift; break;; + esac +done + active_branches="9.1-branch 9.0-branch 8.4-branch 8.3-branch" if [ -n "$1" ]; then @@ -72,7 +83,7 @@ for branch in $active_branches; do # $MYDIR/pg-make-conflicts $branch $MYDIR $WEBDIR $MYDIR/nls-status-page $WEBDIR > $WEBDIR/index.html - rsync -l -r --delete --delete-excluded --exclude='table-*.html' $WEBDIR/ ~/htdocs/ + rsync -l -r --delete --delete-excluded --exclude='table-*.html' $WEBDIR/ "$output_dir" done date -u +%FT%T -- 2.39.5