annotate mkinstalldirs @ 714:d7557252bfb1

[gaim-migrate @ 724] Just a sick idea committer: Tailor Script <tailor@pidgin.im>
author Rob Flynn <gaim@robflynn.com>
date Thu, 17 Aug 2000 23:23:24 +0000
parents 494816c30ca7
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
5
494816c30ca7 [gaim-migrate @ 14]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1 #! /bin/sh
494816c30ca7 [gaim-migrate @ 14]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2 # mkinstalldirs --- make directory hierarchy
494816c30ca7 [gaim-migrate @ 14]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3 # Author: Noah Friedman <friedman@prep.ai.mit.edu>
494816c30ca7 [gaim-migrate @ 14]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
4 # Created: 1993-05-16
494816c30ca7 [gaim-migrate @ 14]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
5 # Public domain
494816c30ca7 [gaim-migrate @ 14]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
6
494816c30ca7 [gaim-migrate @ 14]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
7 # $Id: mkinstalldirs 14 2000-03-23 03:23:41Z robflynn $
494816c30ca7 [gaim-migrate @ 14]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
8
494816c30ca7 [gaim-migrate @ 14]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
9 errstatus=0
494816c30ca7 [gaim-migrate @ 14]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
10
494816c30ca7 [gaim-migrate @ 14]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
11 for file
494816c30ca7 [gaim-migrate @ 14]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
12 do
494816c30ca7 [gaim-migrate @ 14]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
13 set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
494816c30ca7 [gaim-migrate @ 14]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
14 shift
494816c30ca7 [gaim-migrate @ 14]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
15
494816c30ca7 [gaim-migrate @ 14]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
16 pathcomp=
494816c30ca7 [gaim-migrate @ 14]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
17 for d
494816c30ca7 [gaim-migrate @ 14]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
18 do
494816c30ca7 [gaim-migrate @ 14]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
19 pathcomp="$pathcomp$d"
494816c30ca7 [gaim-migrate @ 14]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
20 case "$pathcomp" in
494816c30ca7 [gaim-migrate @ 14]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
21 -* ) pathcomp=./$pathcomp ;;
494816c30ca7 [gaim-migrate @ 14]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
22 esac
494816c30ca7 [gaim-migrate @ 14]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
23
494816c30ca7 [gaim-migrate @ 14]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
24 if test ! -d "$pathcomp"; then
494816c30ca7 [gaim-migrate @ 14]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
25 echo "mkdir $pathcomp" 1>&2
494816c30ca7 [gaim-migrate @ 14]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
26
494816c30ca7 [gaim-migrate @ 14]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
27 mkdir "$pathcomp" || lasterr=$?
494816c30ca7 [gaim-migrate @ 14]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
28
494816c30ca7 [gaim-migrate @ 14]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
29 if test ! -d "$pathcomp"; then
494816c30ca7 [gaim-migrate @ 14]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
30 errstatus=$lasterr
494816c30ca7 [gaim-migrate @ 14]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
31 fi
494816c30ca7 [gaim-migrate @ 14]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
32 fi
494816c30ca7 [gaim-migrate @ 14]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
33
494816c30ca7 [gaim-migrate @ 14]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
34 pathcomp="$pathcomp/"
494816c30ca7 [gaim-migrate @ 14]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
35 done
494816c30ca7 [gaim-migrate @ 14]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
36 done
494816c30ca7 [gaim-migrate @ 14]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
37
494816c30ca7 [gaim-migrate @ 14]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
38 exit $errstatus
494816c30ca7 [gaim-migrate @ 14]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
39
494816c30ca7 [gaim-migrate @ 14]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
40 # mkinstalldirs ends here