On Mon, May 19, 2008 at 10:54 AM, Sebastian Nowicki <[EMAIL PROTECTED]> wrote: > On some systems, namely Mac OSX, command line parsing simply does not > work. It appears $@ gets altered at some stage. This patch uses $ARGLIST > instead, which contains the actual command line arguments > > Signed-off-by: Sebastian Nowicki <[EMAIL PROTECTED]> > --- -p and --forcever have required arguments. This patch still works with those, correct? (Meaning it reads and uses the next arg for the value, and does not attempt to parse the arg as a flag.)
> scripts/makepkg.sh.in | 7 +++---- > 1 files changed, 3 insertions(+), 4 deletions(-) > > diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in > index cc44c68..f56bcda 100644 > --- a/scripts/makepkg.sh.in > +++ b/scripts/makepkg.sh.in > @@ -1143,8 +1143,8 @@ fi > eval set -- "$OPT_TEMP" > unset OPT_SHORT OPT_LONG OPT_TEMP > > -while true; do > - case "$1" in > +for arg in [EMAIL PROTECTED]; do > + case "$arg" in > # Pacman Options > --noconfirm) PACMAN_OPTS="$PACMAN_OPTS --noconfirm" ;; > --noprogressbar) PACMAN_OPTS="$PACMAN_OPTS --noprogressbar" ;; > @@ -1180,10 +1180,9 @@ while true; do > -h|--help) usage; exit 0 ;; # E_OK > -V|--version) version; exit 0 ;; # E_OK > > - --) OPT_IND=0; shift; break;; > + --) OPT_IND=0; continue; break;; Is it just me, or does this make no sense at all (continue followed by break)? And the problem now is our $@ is not properly shifted for this flag to even do anything. > *) usage; exit 1 ;; # E_INVALID_OPTION > esac > - shift > done > > if [ "$HOLDVER" = "1" -a "$FORCE_VER" != "" ]; then > -- I guess I'm thinking this is a well-intentioned patch, but should we try to attack the faulty $@ problem instead? -Dan _______________________________________________ pacman-dev mailing list [email protected] http://archlinux.org/mailman/listinfo/pacman-dev
