2009-03-04 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+ reformat gnupload script.
+ * lib/gnupload: Reformat and reindent.
+
gnupload touchups.
* lib/gnupload (conffile): New variable. Use throughout.
(dry_run): Use `false' and `:' values. Show, don't execute,
while test -n "$1"; do
case $1 in
- -*) collect_var=
- case $1 in
- --help)
- echo "$usage"
- exit $?
- ;;
- --to)
- if test -z "$2"; then
- echo "$0: Missing argument for --to" 1>&2
- exit 1
- else
- to="$to $2"
- shift
- fi
- ;;
- --user)
- if test -z "$2"; then
- echo "$0: Missing argument for --user" 1>&2
- exit 1
- else
- GPG="$GPG --local-user $2"
- shift
- fi
- ;;
- --delete)
- collect_var=delete_files
- ;;
- --rmsymlink)
- collect_var=delete_symlinks
- ;;
- --symlink-regex=*)
- symlink_expr=`expr "$1" : '[^=]*=\(.*\)'`
- ;;
- --symlink-regex)
- symlink_expr='s|-[0-9][0-9\.]*\(-[0-9][0-9]*\)\{0,1\}\.|-latest.|'
- ;;
- --symlink)
- collect_var=symlink_files
- ;;
- --dry-run|-n)
- dry_run=:
- ;;
- --version)
- echo "gnupload $scriptversion"
- exit $?
- ;;
- --)
- shift
- break
- ;;
- -*)
- echo "$0: Unknown option \`$1', try \`$0 --help'" 1>&2
- exit 1
- ;;
- esac
+ -*)
+ collect_var=
+ case $1 in
+ --help)
+ echo "$usage"
+ exit $?
;;
- *) if test -z "$collect_var"; then
- break
+ --to)
+ if test -z "$2"; then
+ echo "$0: Missing argument for --to" 1>&2
+ exit 1
+ else
+ to="$to $2"
+ shift
+ fi
+ ;;
+ --user)
+ if test -z "$2"; then
+ echo "$0: Missing argument for --user" 1>&2
+ exit 1
else
- eval "$collect_var=\"\$$collect_var $1\""
+ GPG="$GPG --local-user $2"
+ shift
fi
;;
+ --delete)
+ collect_var=delete_files
+ ;;
+ --rmsymlink)
+ collect_var=delete_symlinks
+ ;;
+ --symlink-regex=*)
+ symlink_expr=`expr "$1" : '[^=]*=\(.*\)'`
+ ;;
+ --symlink-regex)
+ symlink_expr='s|-[0-9][0-9\.]*\(-[0-9][0-9]*\)\{0,1\}\.|-latest.|'
+ ;;
+ --symlink)
+ collect_var=symlink_files
+ ;;
+ --dry-run|-n)
+ dry_run=:
+ ;;
+ --version)
+ echo "gnupload $scriptversion"
+ exit $?
+ ;;
+ --)
+ shift
+ break
+ ;;
+ -*)
+ echo "$0: Unknown option \`$1', try \`$0 --help'" 1>&2
+ exit 1
+ ;;
+ esac
+ ;;
+ *)
+ if test -z "$collect_var"; then
+ break
+ else
+ eval "$collect_var=\"\$$collect_var $1\""
+ fi
+ ;;
esac
shift
done