X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=support%2Fmkdirs;h=b79d9716f464b54db8828aee413878154382d0bd;hb=ccc6cda312fea9f0468ee65b8f368e9653e1380b;hp=52228d1eabebe5ffd1abd2d0c2ae7d65e5c0e605;hpb=726f63884db0132f01745f1fb4465e6621088ccf;p=platform%2Fupstream%2Fbash.git diff --git a/support/mkdirs b/support/mkdirs index 52228d1..b79d971 100755 --- a/support/mkdirs +++ b/support/mkdirs @@ -8,21 +8,24 @@ for dir do - [ -d "$dir" ] && continue + test -d "$dir" && continue tomake=$dir - while [ "$dir" ]; do + while test -n "$dir" ; do # dir=${dir%/*} - # dir=`expr "$dir" ':' '^\(/.*\)/[^/]*'` - dir=`expr "$dir" ':' '^\(.*\)/[^/]*'` - tomake="$dir $tomake" + # dir=`expr "$dir" ':' '\(/.*\)/[^/]*'` + if dir=`expr "$dir" ':' '\(.*\)/[^/]*'`; then + tomake="$dir $tomake" + else + dir= + fi done for d in $tomake do - [ -d $d ] && continue - echo mkdir $d - mkdir $d + test -d "$d" && continue + echo mkdir "$d" + mkdir "$d" done done