Mercurial > hg > octave-nkf > gnulib-hg
changeset 16901:1b163013d9bf
implement --replace for ftp-upload protocol v1.2
author | Karl Berry <karl@freefriends.org> |
---|---|
date | Sun, 10 Jun 2012 17:05:27 -0700 |
parents | 84563bab7ebd |
children | 1cdf36c56e21 |
files | ChangeLog build-aux/gnupload |
diffstat | 2 files changed, 18 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2012-06-10 Karl Berry <karl@gnu.org> + + * build-aux/gnupload: implement --replace, ftp-upload protocol v1.2. + 2012-06-10 Bruce Korb <bkorb@gnu.org> parse-duration: Relicense under LGPLv2+.
--- a/build-aux/gnupload +++ b/build-aux/gnupload @@ -1,7 +1,7 @@ #!/bin/sh # Sign files and upload them. -scriptversion=2012-01-15.15; # UTC +scriptversion=2012-06-11.00; # UTC # Copyright (C) 2004-2012 Free Software Foundation, Inc. # @@ -28,6 +28,7 @@ conffile=.gnuploadrc to= dry_run=false +replace= symlink_files= delete_files= delete_symlinks= @@ -53,8 +54,10 @@ --to DEST specify one destination for FILES (multiple --to options are allowed) --user NAME sign with key NAME + --replace allow replacements of existing files --symlink-regex[=EXPR] use sed script EXPR to compute symbolic link names --dry-run do nothing, show what would have been done + (including the constructed directive file) --version output version information and exit If --symlink-regex is given without EXPR, then the link target name @@ -146,6 +149,9 @@ --delete) collect_var=delete_files ;; + --replace) + replace="replace: true" + ;; --rmsymlink) collect_var=delete_symlinks ;; @@ -270,7 +276,7 @@ fi cat >${2}.directive<<EOF -version: 1.1 +version: 1.2 directory: $1 comment: gnupload v. $scriptversion$stmt EOF @@ -393,6 +399,12 @@ do echo "Uploading $file to $dest ..." stmt= + # + # allowing file replacement is all or nothing. + if test -n "$replace"; then stmt="$stmt +$replace" + fi + # files="$file $file.sig" destdir=`echo $dest | sed 's/[^:]*://'` if test -n "$symlink_expr"; then