From b626c4e16c491c10546351d614041aedf2139dc9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fredrik=20H=C3=BCbinette=20=28Hubbe=29?= <hubbe@hubbe.net> Date: Sat, 6 May 2000 15:30:51 -0700 Subject: [PATCH] create directories as needed... Rev: bin/install_module:1.2 --- bin/install_module | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/bin/install_module b/bin/install_module index 3e97836760..89824b4cd8 100755 --- a/bin/install_module +++ b/bin/install_module @@ -6,10 +6,13 @@ FROM="$1" TO="$2" +DIRS_TO_MAKE= + DIR="$TO" while : do DIR=`echo $DIR | sed -e 's@/[^/]*$@@'` + case "$DIR" in *.pmod) if [ -d "$DIR" ]; then @@ -34,6 +37,8 @@ do break fi +#FIXME: Add sed expression to quote spaces, quotes etc. in $DIR + DIRS_TO_MAKE="$DIR $DIRS_TO_MAKE" ;; *) break ;; esac @@ -42,6 +47,12 @@ done BASE=`echo $TO | sed -e 's/\.[^.]*$//'` +if test "x$DIRS_TO_MAKE" != x; then + mkdir $DIRS_TO_MAKE +else + : +fi + if [ -d "$BASE.pmod" ]; then EXT=`echo $TO | sed -e 's@(\.[^.]$)@\1@/'` TO="$BASE.pmod/module.$EXT" -- GitLab