diff options
author | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2010-04-09 16:13:32 -0700 |
---|---|---|
committer | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2010-04-09 16:15:01 -0700 |
commit | 2d698b6e42d8dca191ac795ef5dba3bf62496eec (patch) | |
tree | ac5e0b67043c50f49160e9fe407435706cf30444 /debian/patches/bash-aliases-repeat.dpatch | |
parent | f1250933e4a2ac09a3d0b25b3877068e12f44da5 (diff) | |
download | vyatta-bash-2d698b6e42d8dca191ac795ef5dba3bf62496eec.tar.gz vyatta-bash-2d698b6e42d8dca191ac795ef5dba3bf62496eec.zip |
Integrate bash 3.2 version
This is merge of current Debian stable (Lenny) version of Bash
with Vyatta changes.
Diffstat (limited to 'debian/patches/bash-aliases-repeat.dpatch')
-rw-r--r-- | debian/patches/bash-aliases-repeat.dpatch | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/debian/patches/bash-aliases-repeat.dpatch b/debian/patches/bash-aliases-repeat.dpatch new file mode 100644 index 0000000..ae1ac9b --- /dev/null +++ b/debian/patches/bash-aliases-repeat.dpatch @@ -0,0 +1,45 @@ +#! /bin/sh -e + +if [ $# -eq 3 -a "$2" = '-d' ]; then + pdir="-d $3" +elif [ $# -ne 1 ]; then + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +fi +case "$1" in + -patch) patch $pdir -f --no-backup-if-mismatch -p0 < $0;; + -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p0 < $0;; + *) + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +esac +exit 0 + +# DP: Fix bug in Bash_aliases example. + +--- examples/startup-files/Bash_aliases~ 2008-04-19 21:57:24.000000000 +0200 ++++ examples/startup-files/Bash_aliases 2008-04-19 21:59:43.000000000 +0200 +@@ -41,20 +41,20 @@ + { + local count="$1" i; + shift; +- for i in $(seq 1 "$count"); ++ for i in $(_seq 1 "$count"); + do + eval "$@"; + done + } + + # Subfunction needed by `repeat'. +-seq () ++_seq () + { + local lower upper output; + lower=$1 upper=$2; + + if [ $lower -ge $upper ]; then return; fi +- while [ $lower -le $upper ]; ++ while [ $lower -lt $upper ]; + do + echo -n "$lower " + lower=$(($lower + 1)) |