X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=build-aux%2Fgnupload;h=edb4b56bb55b6ce2b6a60e17579b5521ba6a9ebb;hb=7782dda23150ffa38818f92810506fbefc21903d;hp=a1add234da42c00aabc0dcd2f2bfa8f0b18a2bba;hpb=c6162b39c2b35a9c29b24454c29b82facbc621d7;p=gnulib.git diff --git a/build-aux/gnupload b/build-aux/gnupload index a1add234d..edb4b56bb 100755 --- a/build-aux/gnupload +++ b/build-aux/gnupload @@ -1,13 +1,14 @@ #!/bin/sh # Sign files and upload them. -scriptversion=2009-03-04.21 +scriptversion=2010-05-23.15; # UTC -# Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation +# Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software +# Foundation, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3, or (at your option) +# the Free Software Foundation; either version 2, or (at your option) # any later version. # # This program is distributed in the hope that it will be useful, @@ -23,7 +24,7 @@ scriptversion=2009-03-04.21 set -e GPG='gpg --batch --no-tty' -conffile=.gnupload +conffile=.gnuploadrc to= dry_run=false symlink_files= @@ -31,11 +32,14 @@ delete_files= delete_symlinks= collect_var= dbg= +nl=' +' -usage="Usage: $0 [OPTIONS]... [COMMAND] FILES... [[COMMAND] FILES...] +usage="Usage: $0 [OPTION]... [CMD] FILE... [[CMD] FILE...] -Sign all FILES, and upload them to selected destinations, according to -. +Sign all FILES, and process them at selected destinations according to CMD. + +explains further. Commands: --delete delete FILES from destination @@ -73,34 +77,33 @@ actual command line options. Use this to keep your defaults. Comments (#) and empty lines in $conffile are allowed. Examples: -1. Upload automake-1.8.2b.tar.gz and automake-1.8.2b.tar.bz2 to two sites: - gnupload --to sources.redhat.com:~ftp/pub/automake \\ - --to alpha.gnu.org:automake \\ - automake-1.8.2b.tar.gz automake-1.8.2b.tar.bz2 - -2. Same as above, but also create symbolic links to automake-latest.tar.*: - gnupload --to sources.redhat.com:~ftp/pub/automake \\ - --to alpha.gnu.org:automake \\ - --symlink-regex \\ - automake-1.8.2b.tar.gz automake-1.8.2b.tar.bz2 +1. Upload foobar-1.0.tar.gz to ftp.gnu.org: + gnupload --to ftp.gnu.org:foobar foobar-1.0.tar.gz + +2. Upload foobar-1.0.tar.gz and foobar-1.0.tar.xz to ftp.gnu.org: + gnupload --to ftp.gnu.org:foobar foobar-1.0.tar.gz foobar-1.0.tar.xz -3. Symlink automake-1.8.2b.tar.gz to automake-latest.tar.gz and -automake-1.8.2b.tar.bz2 to automake-latest.tar.bz2 on both sites: +3. Same as above, and also create symbolic links to foobar-latest.tar.*: + gnupload --to ftp.gnu.org:foobar \\ + --symlink-regex \\ + foobar-1.0.tar.gz foobar-1.0.tar.xz - gnupload --to sources.redhat.com:~ftp/pub/automake \\ - --to alpha.gnu.org:automake \\ - --symlink automake-1.8.2b.tar.gz automake-latest.tar.gz \\ - automake-1.8.2b.tar.bz2 automake-latest.tar.bz2 +4. Upload foobar-0.9.90.tar.gz to two sites: + gnupload --to alpha.gnu.org:foobar \\ + --to sources.redhat.com:~ftp/pub/foobar \\ + foobar-0.9.90.tar.gz -4. Delete automake-1.8.2a.tar.gz and .bz2, remove symlink -automake-latest.tar.gz and upload automake-1.8.2b.tar.gz: +5. Delete oopsbar-0.9.91.tar.gz and upload foobar-0.9.91.tar.gz + (the -- terminates the list of files to delete): + gnupload --to alpha.gnu.org:foobar \\ + --to sources.redhat.com:~ftp/pub/foobar \\ + --delete oopsbar-0.9.91.tar.gz \\ + -- foobar-0.9.91.tar.gz - gnupload --to sources.redhat.com:~ftp/pub/automake \\ - --to alpha.gnu.org:automake \\ - --delete automake-1.8.2a.tar.gz automake-1.8.2a.tar.bz2 \\ - --rmsymlink automake-latest.tar.gz \\ - -- \\ - automake-1.8.2b.tar.gz automake-1.8.2b.tar.bz2 +gnupload uses the ncftpput program to do the transfers; if you don't +happen to have an ncftp package installed, the ncftpput-ftp script in +the build-aux/ directory of the gnulib package +(http://savannah.gnu.org/projects/gnulib) may serve as a replacement. Report bugs to . Send patches to ." @@ -108,7 +111,8 @@ Send patches to ." # Read local configuration file if test -r "$conffile"; then echo "$0: Reading configuration file $conffile" - eval set x "`sed 's/#.*$//;/^$/d' \"$conffile\" | tr '\012\015' ' '` \"\$@\"" + conf=`sed 's/#.*$//;/^$/d' "$conffile" | tr "\015$nl" ' '` + eval set x "$conf \"\$@\"" shift fi @@ -184,7 +188,7 @@ done dprint() { - echo "Running $*..." + echo "Running $* ..." } if $dry_run; then @@ -248,7 +252,7 @@ echo if test $# -ne 0; then for file do - echo "Signing $file..." + echo "Signing $file ..." rm -f $file.sig echo "$passphrase" | $dbg $GPG --passphrase-fd 0 -ba -o $file.sig $file done @@ -387,7 +391,7 @@ for dest in $to do for file do - echo "Uploading $file to $dest..." + echo "Uploading $file to $dest ..." stmt= files="$file $file.sig" destdir=`echo $dest | sed 's/[^:]*://'` @@ -407,5 +411,6 @@ exit 0 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-end: "$" +# time-stamp-time-zone: "UTC" +# time-stamp-end: "; # UTC" # End: