[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnu-arch-users] Re: from a file's point of view
From: |
Samuel Tardieu |
Subject: |
[Gnu-arch-users] Re: from a file's point of view |
Date: |
Mon, 22 Sep 2003 10:43:43 +0200 |
User-agent: |
Mutt/1.5.4i |
On 22/09, Miles Bader wrote:
| Samuel Tardieu <address@hidden> writes:
| > it uses "xargs -r". Couldn't you use an alternate more portable
| > construction? (I mean without "-r")
|
| Such as ...?
A combination of "test -n" and "xargs". This is less elegant, but more
portable. Example:
--- orig/tla-file-log.shpp
+++ mod/tla-file-log.shpp
@@ -23,7 +23,12 @@
FILE="$1"
# Remember all patch logs we have
-set -- `$TLA logs | xargs -r $TLA log-ls -f -r`
+logs=`$TLA logs`
+if test -n "$logs"; then
+ set -- `$TLA log-ls -f -r $logs`
+else
+ set
+fi
This could even be abstracted in a function.
Sam
Re: [Gnu-arch-users] from a file's point of view, Bruce Stephens, 2003/09/22