Since I'd suggested it, I was hoping someone else would review it too, but
since I haven't seen anyone else...

Reviewed-by: Alan Coopersmith <[email protected]>

        -alan-

Yaakov (Cygwin/X) wrote:
> From: Yaakov Selkowitz <[email protected]>
> 
> The '-p' option to mkdir(1) is required by SUSv2/Unix98, so we should be
> able to rely on it on all systems we support.  Some parts need to be
> left in place in order to not alter some of its ancient, shall we say,
> quirks.
> 
> Signed-off-by: Yaakov Selkowitz <[email protected]>
> ---
>  mkdirhier |   35 +----------------------------------
>  1 files changed, 1 insertions(+), 34 deletions(-)
> 
> diff --git a/mkdirhier b/mkdirhier
> index f275b90..0efd4c7 100644
> --- a/mkdirhier
> +++ b/mkdirhier
> @@ -22,45 +22,12 @@ do
>               echo >&2 "mkdirhier: directory name contains a newline: 
> \`\`$directory''"
>               status=1
>               continue;;
> -     ///*) prefix=/;; # See Posix 2.3 "path".
> -     //*) prefix=//;;
> -     /*) prefix=/;;
>       -*) prefix=./;;
>       *) prefix=
>       esac
>  
> -     IFS=/
> -     set x $directory
> -     case $2 in
> -         */*)        # IFS parsing is broken
> -             IFS=' '
> -             set x `echo $directory | tr / ' '`
> -             ;;
> -     esac
> -     IFS=$newline
> -     shift
> -
> -     for filename
> -     do
> -             path=$prefix$filename
> -             prefix=$path/
> -             shift
> -
> -             test -d "$path" || {
> -                     paths=$path
> -                     for filename
> -                     do
> -                             if [ -n "$filename" -a "$filename" != "." ]; 
> then
> -                                     path=$path/$filename
> -                                     paths=$paths$newline$path
> -                             fi
> -                     done
> -
> -                     mkdir $paths || status=$?
> +     mkdir -p $prefix$directory || status=$?
>  
> -                     break
> -             }
> -     done
>    done
>  
>  exit $status


-- 
        -Alan Coopersmith-        [email protected]
         Oracle Solaris Platform Engineering: X Window System

_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to