From 9c2b38bd17e73852f9bed3fffe534139bcfc6631 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 14 Nov 2006 23:51:17 +0100 Subject: [PATCH] Fix possible problem due to not checked success of cd --- ccollect.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/ccollect.sh b/ccollect.sh index 27c70ce..1e4312f 100755 --- a/ccollect.sh +++ b/ccollect.sh @@ -103,7 +103,7 @@ while [ $i -le $# ]; do VERBOSE=1 ;; -p|--parallel) - PARALLEL="1" + PARALLEL=1 ;; -h|--help) usage @@ -154,8 +154,7 @@ if [ "$ALL" = 1 ]; then # get entries from sources # cwd=$(pwd -P) - cd "$CSOURCES"; - ls > "$TMP" + ( cd "$CSOURCES" && ls > "$TMP" ) if [ "$?" -ne 0 ]; then echo "Listing of sources failed. Aborting."