On Mon, May 7, 2012 at 12:02 AM, ольга крыжановская
<[email protected]> wrote:
> On Sun, May 6, 2012 at 11:56 PM, ольга крыжановская
> <[email protected]> wrote:
>> Glenn, below is a small patch which cleans the sole warning for ksh -n
>> up in tar.sh:
>> ===============================
>> --- ./src/cmd/pax/tar.sh.original 2012-05-06 23:51:07.644960298 +0200
>> +++ ./src/cmd/pax/tar.sh 2012-05-06 23:52:15.311218659 +0200
>> @@ -175,7 +175,7 @@
>> ;;
>> j) zip=":bzip" ;;
>> k) options+=" -u" ;;
>> - o) owner=`who am i | sed -e 's/ .*//'`
>> + o) owner="$(who am i | sed -e 's/ .*//')"
>> options+=" --owner $owner"
>> ;;
>> p) options+=" -pe" ;;
>> ===============================
>>
>> Also, can you make a nmakefile rule which uses shcomp to create tar
>> from tar.sh and installs it in arch/*/bin, please?
[snip]
Attached (as "ast_tar_l10n.diff.txt") is the patch to add localisation
support to "tar.sh". The missing bits are the ksh -D rules in
NMakefile&co. to create the matching "C" catalog files (I don't know
exactly how to do that with nmake) ... ;-/
----
Bye,
Roland
--
__ . . __
(o.\ \/ /.o) [email protected]
\__\/\/__/ MPEG specialist, C&&JAVA&&Sun&&Unix programmer
/O /==\ O\ TEL +49 641 3992797
(;O/ \/ \O;)
--- original/./src/cmd/pax/tar.sh 2012-05-04 20:25:06.000000000 +0200
+++ ./src/cmd/pax/tar.sh 2012-05-07 01:18:19.989858881 +0200
@@ -118,7 +118,7 @@
{
case $1 in
[0-9]) case $fileSpecified in
- true) print -u2 "$command: cannot specify both file and
tape$synopsis"; exit 1 ;;
+ true) print -u2 $"%s: cannot specify both file and tape%s"
"$command" "$synopsis"; exit 1 ;;
*) file="-o tape=$1"
tapeSpecified=true
;;
@@ -127,7 +127,7 @@
13) options+=" --atime" ;;
23) if [[ $# == 0 ]]
then
- print -u2 "$command: excluded file name argument
expected$synopsis"; exit 1
+ print -u2 $"%s: excluded file name argument expected%s"
"$command" "$synopsis"; exit 1
else
excludedFiles+=" $OPTARG"
directedToExclude=true
@@ -135,7 +135,7 @@
fi
;;
[hlm]) case $lastopt in
- [0-9]) file="${file}$1" ;;
+ [0-9]) file+="$1" ;;
*) case $1 in
h) options+=" -L" ;;
l) ;;
@@ -149,7 +149,7 @@
optsWargs+="b "
elif [[ $# == 0 ]]
then
- print -u2 "$command: blocking factor argument
expected$synopsis"; exit 1
+ print -u2 $"%s: blocking factor argument expected%s"
"$command" "$synopsis"; exit 1
else
options+=" -b ${OPTARG}b"
fi
@@ -157,14 +157,14 @@
c) mode="-w" ; r_ok=false ;;
f) if [[ $tapeSpecified == true ]]
then
- print -u2 "$command: cannot specify both file and
tape$synopsis"; exit 1
+ print -u2 $"%s: cannot specify both file and tape%s"
"$command" "$synopsis"; exit 1
elif [[ $2 == "short form" ]]
then
optsWargs+="f "
fileSpecified=true
elif [[ $# == 0 ]]
then
- print -u2 "$command: file name argument
expected$synopsis"; exit 1
+ print -u2 $"%s: file name argument expected%s"
"$command" "$synopsis"; exit 1
else
case $1 in # Retain most recent file operand
-) file="" ;;
@@ -194,7 +194,7 @@
optsWargs+="L "
elif [[ $# == 0 ]]
then
- print -u2 "$command: maxout argument
expected$synopsis"; exit 1
+ print -u2 $"%s: maxout argument expected%s" "$command"
"$synopsis"; exit 1
else
options+=" --maxout=$(($OPTARG*1024))"
fi
@@ -204,7 +204,7 @@
optsWargs+="V "
elif [[ $# == 0 ]]
then
- print -u2 "$command: volume label argument
expected$synopsis"; exit 1
+ print -u2 $"%s: volume label argument expected%s"
"$command" "$synopsis"; exit 1
else
options+=" --label=$OPTARG"
fi
@@ -242,13 +242,13 @@
do
case $i in
b) case $# in
- 0) print -u2 "$command: blocking factor argument
expected$synopsis"; exit 1 ;;
+ 0) print -u2 $"%s: blocking factor argument expected%s"
"$command" "$synopsis"; exit 1 ;;
esac
block=$1 # Retain most recent block operand
shift
;;
f) case $# in
- 0) print -u2 "$command: file name argument
expected$synopsis"; exit 1 ;;
+ 0) print -u2 $"%s: file name argument expected%s"
"$command" "$synopsis"; exit 1 ;;
esac
case $1 in # Retain most recent file operand
-) file="" ;;
@@ -257,13 +257,13 @@
shift
;;
L) case $# in
- 0) print -u2 "$command: maxout argument
expected$synopsis"; exit 1 ;;
+ 0) print -u2 $"%s: maxout argument expected%s" "$command"
"$synopsis"; exit 1 ;;
esac
- maxout=$(($1*1024)) # Retain most recent maxout operand
+ (( maxout=$1*1024 )) # Retain most recent maxout operand
shift
;;
V) case $# in
- 0) print -u2 "$command: volume label argument
expected$synopsis"; exit 1 ;;
+ 0) print -u2 $"%s: volume label argument expected%s"
"$command" "$synopsis"; exit 1 ;;
esac
label=$1 # Retain most recent label operand
shift
@@ -294,21 +294,21 @@
case $mode in
-r) case $r_ok in
- false) print -u2 "$command: options inconsistent with archive read";
exit 1 ;;
+ false) print -u2 $"%s: options inconsistent with archive read"
"$command"; exit 1 ;;
esac
case $list in
true) mode="" ;;
esac
;;
-w) case $w_ok in
- false) print -u2 "$command: options inconsistent with archive write";
exit 1 ;;
+ false) print -u2 $"%s: options inconsistent with archive write"
"$command"; exit 1 ;;
esac
case $# in
0) set "." ;;
esac
options+=" -x $format$zip"
;;
-*) print -u2 "$command: one of Acrtx must be specified$synopsis"; exit 1 ;;
+*) print -u2 $"%s: one of Acrtx must be specified$synopsis" "$command";
exit 1 ;;
esac
eval pax $mode $options $file $xstring "$@"
_______________________________________________
ast-developers mailing list
[email protected]
https://mailman.research.att.com/mailman/listinfo/ast-developers