quilt-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Quilt-dev] Another shell re-write of backup-files.


From: Kaz Kylheku
Subject: Re: [Quilt-dev] Another shell re-write of backup-files.
Date: Fri, 18 Mar 2011 10:41:21 -0700
User-agent: Roundcube Webmail/0.4

On Fri, 18 Mar 2011 10:32:18 -0700, Kaz Kylheku <address@hidden>
wrote: 
> Plus a few more fixes. It's behaving well for me now. I'm ready
> for stress-testing with big patch stacks.

Oh, and one little thing: unbound access to $1 due to non-strict
evaluation order for "test -a".
This broke under "quilt snapshot".

I'm a big believer in "set -eu".

@@ -127,7 +128,7 @@ if [ $# -ge 1 -a -n "$opt_file" ] ; then
        exit 1
 fi
 
-if [ $# -gt 1 -a "$1" == "-" ] ; then
+if [ $# -gt 1 -a "${1:-}" == "-" ] ; then
        echo "Error: if - is specified, then no other arguments can be added"
        echo
        usage





reply via email to

[Prev in Thread] Current Thread [Next in Thread]