Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F104552619
mkinstalldirs
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Mon, Mar 10, 10:00
Size
738 B
Mime Type
text/x-shellscript
Expires
Wed, Mar 12, 10:00 (1 d, 20 h)
Engine
blob
Format
Raw Data
Handle
24395842
Attached To
R3600 invenio-infoscience
mkinstalldirs
View Options
#! /bin/sh
# mkinstalldirs --- make directory hierarchy
# Author: Noah Friedman <friedman@prep.ai.mit.edu>
# Created: 1993-05-16
# Public domain
# Modified by Tibor Simko to add explicitly "umask 022".
# $Id$
errstatus
=
0
umask
022
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
Event Timeline
Log In to Comment