[Xfce4-commits] <xfce4-dev-tools:master> Check if $1 is a file before calling cat (bug #6101).

Nick Schermer noreply at xfce.org
Sun Oct 31 12:48:01 CET 2010


Updating branch refs/heads/master
         to 6bdbfdf491d3aa61806edc24b6a4cf984083c7ec (commit)
       from 0a39faed46ec1a72540649c69efd198a118851e8 (commit)

commit 6bdbfdf491d3aa61806edc24b6a4cf984083c7ec
Author: Nick Schermer <nick at xfce.org>
Date:   Sun Oct 31 12:45:04 2010 +0100

    Check if $1 is a file before calling cat (bug #6101).

 scripts/xdt-autogen.in.in |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/scripts/xdt-autogen.in.in b/scripts/xdt-autogen.in.in
index 74bb2e8..bbfa626 100644
--- a/scripts/xdt-autogen.in.in
+++ b/scripts/xdt-autogen.in.in
@@ -70,7 +70,7 @@ fi
 ##
 parse_configure_subdirs()
 {
-  cat "$1" | tr '\\n\\t\\\\' '   ' | sed -ne 's|.*AC_CONFIG_SUBDIRS(\[\{0,1\}\([[:alnum:]_ @/-]\{1,\}\).*|\1|p'
+  test -f "$1" && cat "$1" | tr '\\n\\t\\\\' '   ' | sed -ne 's|.*AC_CONFIG_SUBDIRS(\[\{0,1\}\([[:alnum:]_ @/-]\{1,\}\).*|\1|p'
 }
 
 ##



More information about the Xfce4-commits mailing list