mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-12-03 04:12:10 +08:00
33 lines
427 B
Plaintext
33 lines
427 B
Plaintext
|
#! /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
|