source: trunk/gsdl/packages/yaz/mkinstalldirs@ 1860

Last change on this file since 1860 was 1348, checked in by jrm21, 24 years ago

A few minor changes while merging branch to help clean compilation

  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 664 bytes
Line 
1#! /bin/sh
2# mkinstalldirs --- make directory hierarchy
3# Author: Noah Friedman <[email protected]>
4# Created: 1993-05-16
5# Public domain
6
7
8errstatus=0
9
10for file
11do
12 set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
13 shift
14
15 pathcomp=
16 for d
17 do
18 pathcomp="$pathcomp$d"
19 case "$pathcomp" in
20 -* ) pathcomp=./$pathcomp ;;
21 esac
22
23 if test ! -d "$pathcomp"; then
24 echo "mkdir $pathcomp"
25
26 mkdir "$pathcomp" || lasterr=$?
27
28 if test ! -d "$pathcomp"; then
29 errstatus=$lasterr
30 fi
31 fi
32
33 pathcomp="$pathcomp/"
34 done
35done
36
37exit $errstatus
38
39# mkinstalldirs ends here
Note: See TracBrowser for help on using the repository browser.