OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [insight/] [readline/] [support/] [mkdirs] - Rev 1779

Go to most recent revision | Compare with Previous | Blame | View Log

#! /bin/sh
#
# mkdirs - a work-alike for `mkdir -p'
#
# Chet Ramey
# chet@po.cwru.edu

for dir
do

        test -d "$dir" && continue

        tomake=$dir
        while test -n "$dir" ; do
                # dir=${dir%/*}
                # dir=`expr "$dir" ':' '\(/.*\)/[^/]*'`
                if dir=`expr "$dir" ':' '\(.*\)/[^/]*'`; then
                        tomake="$dir $tomake"
                else
                        dir=
                fi
        done

        for d in $tomake
        do
                test -d "$d" && continue
                echo mkdir "$d"
                mkdir "$d"
        done
done

exit 0

Go to most recent revision | Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.