Initial devel branch import from bash-3.0-alpha

This commit is contained in:
Chet Ramey
2011-11-28 14:41:26 -05:00
parent 7117c2d221
commit d3a24ed242
261 changed files with 24280 additions and 6327 deletions
+2 -2
View File
@@ -39,7 +39,7 @@ cd()
set -- $HOME
fi
if [ "$CDHISTFILE" -a -r "$CDHISTFILE" ] # if directory history exists
if [ "$CDHISTFILE" ] && [ -r "$CDHISTFILE" ] # if directory history exists
then
typeset CDHIST
i=-1
@@ -49,7 +49,7 @@ cd()
done <$CDHISTFILE
fi
if [ "${CDHIST[0]}" != "$PWD" -a "$PWD" != "" ]
if [ "${CDHIST[0]}" != "$PWD" ] && [ -n "$PWD" ]
then
_cdins # insert $PWD into cd history
fi
+2 -2
View File
@@ -56,13 +56,13 @@ FindSectionsInIndex ()
fi
done
[ -z "$indexes" ] && return
# Make egrep give filename
# Make grep give filename
[ NIndex -lt 2 ] && indexes="$indexes /dev/null"
# set positional parameters to
# indexfile:searchname pagename section ...
# e.g.
# /usr/man/index:FP_OFF Routines DOS
set -- `egrep "^$page[ ]" $indexes`
set -- `grep "^$page[ ]" $indexes`
while [ $# -gt 2 ]; do
FileNames[i]=${1%%index*}cat$3/$2.$3
Sections[i]=$3
+1 -1
View File
@@ -110,7 +110,7 @@ function CopyFiles {
*/) ;; # don't add / if trailing / already present
*) if [ $# -gt 2 ] || # if more than two args given, last must be a dir
# If dest in on local machine, check whether it is a directory
[ $DestMach = $LocalMach -a -d $DestPath ] ||
[ $DestMach = $LocalMach ] && [ -d "$DestPath" ] ||
# If dest ends with . or .., it is a directory
lastisdot "$DestPath"
then
+1 -1
View File
@@ -103,7 +103,7 @@ esac
shift
[ -z "$end" -o $count -le "$end" ] && increment=1 || increment=-1
[ -z "$end" ] && [ $count -le "$end" ] && increment=1 || increment=-1
istrue $verbose && echo "start=$count end=$end" 1>&2
+1 -1
View File
@@ -38,7 +38,7 @@ for i in "$@"; do
vars="$vars $i"
;;
*)
if [ ! -x $i -o ! -d $i ]; then # arg must be a dir and executable
if [ ! -x $i ] || [ ! -d $i ]; then # arg must be a dir and executable
echo "$i: directory not accessible."
exit
fi