From fd6f38c18fcb0d03e9931037cbeead04bb50a73e Mon Sep 17 00:00:00 2001 From: Laurence Withers Date: Mon, 5 Feb 2007 13:39:50 +0000 Subject: [PATCH] Fix recursion in build_dir_tree --- make.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/make.sh b/make.sh index e50b890..2aca565 100755 --- a/make.sh +++ b/make.sh @@ -155,7 +155,11 @@ build_dir_tree() { return 1 fi - local DIR="${INSTALL_PREFIX}$1" + build_dir_tree_recurse "${INSTALL_PREFIX}$1" +} + +build_dir_tree_recurse() { + local DIR="$1" # if the directory already exists, return success [ -d "${DIR}" ] && return 0 @@ -173,7 +177,7 @@ build_dir_tree() { mkdir "${DIR}" >& /dev/null if [ $? -ne 0 ] then - build_dir_tree $(dirname "${DIR}") || return 1 + build_dir_tree_recurse $(dirname "${DIR}") || return 1 mkdir "${DIR}" if [ $? -ne 0 ] then