Page Menu
Home
Phabricator (Chris)
Search
Configure Global Search
Log In
Files
F625554
mkinstalldirs
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Authored By
Unknown
Size
721 B
Referenced Files
None
Subscribers
None
mkinstalldirs
View Options
#! /bin/sh
# mkinstalldirs --- make directory hierarchy
# Author: Noah Friedman <friedman@prep.ai.mit.edu>
# Created: 1993-05-16
# Public domain
# $Id: mkinstalldirs,v 1.2 2003/09/01 20:40:21 upi Exp $
errstatus
=
0
for
file
do
set
fnord
`
echo
":
$file
"
|
sed
-ne
's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'
`
shift
pathcomp
=
for
d
do
pathcomp
=
"
$pathcomp$d
"
case
"
$pathcomp
"
in
-*
)
pathcomp
=
./
$pathcomp
;;
esac
if
test
!
-d
"
$pathcomp
"
;
then
echo
"mkdir
$pathcomp
"
mkdir
"
$pathcomp
"
||
lasterr
=
$?
if
test
!
-d
"
$pathcomp
"
;
then
errstatus
=
$lasterr
fi
fi
pathcomp
=
"
$pathcomp
/"
done
done
exit
$errstatus
# mkinstalldirs ends here
File Metadata
Details
Attached
Mime Type
text/x-shellscript
Expires
Sat, Nov 14, 11:37 PM (1 d, 12 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
133309
Default Alt Text
mkinstalldirs (721 B)
Attached To
Mode
R76 OpenMortal
Attached
Detach File
Event Timeline