Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F85671155
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
Tue, Oct 1, 00:45
Size
738 B
Mime Type
text/x-shellscript
Expires
Thu, Oct 3, 00:45 (2 d)
Engine
blob
Format
Raw Data
Handle
21226978
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