]> err.no Git - sope/blob - create_domain_dir_tree.sh
758e30316336fcf8eacc8fa32a1d29d045e04957
[sope] / create_domain_dir_tree.sh
1 #!/bin/sh
2 # create_domain_dir_tree.sh
3 #
4 # Copyright (C) 2002 Free Software Foundation, Inc.
5 #
6 # Author: Nicola Pero <n.pero@mi.flashnet.it>
7 # Date: October 2002
8 #
9 # This file is part of the GNUstep Makefile Package.
10 #
11 # This library is free software; you can redistribute it and/or
12 # modify it under the terms of the GNU General Public License
13 # as published by the Free Software Foundation; either version 2
14 # of the License, or (at your option) any later version.
15
16 # You should have received a copy of the GNU General Public
17 # License along with this library; see the file COPYING.LIB.
18 # If not, write to the Free Software Foundation,
19 # 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
20
21 # Take a single argument - a directory name -, and create the GNUstep
22 # domain directory structure inside the directory.
23
24 # It is automatically called with argument ${GNUSTEP_SYSTEM_ROOT} when
25 # gnustep-make is installed; you can call it with argument
26 # ${GNUSTEP_LOCAL_ROOT} or ${GNUSTEP_NETWORK_ROOT} (or your own
27 # GNUstep user dir) if you need to create manually a GNUstep domain
28 # directory tree in there.
29
30 if [ -z "$*" ]; then
31   echo "No arguments specified" >&2
32   exit 0
33 fi
34
35 # The original code
36 # mydir=`dirname "$0"`
37
38 # But it seems that on OpenStep, dirname is not available, so we use
39 # the following trick.  The sed expression replaces /[^/]*$ (which
40 # means '/' followed by a sequence of zero or more non-'/' characters,
41 # followed by end-of-line) with nothing (that is, it deletes it), and
42 # what remains is the dirname.
43 mydir=`echo "$0" | sed -e "s#/[^/]*\\\$##"`
44
45 basepath="$1"
46
47 ${mydir}/mkinstalldirs  "$basepath" \
48                 "$basepath"/Applications \
49                 "$basepath"/Tools/${GNUSTEP_TARGET_LDIR} \
50                 "$basepath"/Tools/Resources \
51                 "$basepath"/Tools/Java \
52                 "$basepath"/Library/ApplicationSupport \
53                 "$basepath"/Library/Bundles \
54                 "$basepath"/Library/ColorPickers \
55                 "$basepath"/Library/Colors \
56                 "$basepath"/Library/DocTemplates \
57                 "$basepath"/Library/Documentation/Developer \
58                 "$basepath"/Library/Documentation/User \
59                 "$basepath"/Library/Documentation/info \
60                 "$basepath"/Library/Documentation/man \
61                 "$basepath"/Library/Fonts \
62                 "$basepath"/Library/Frameworks \
63                 "$basepath"/Library/Headers/${MAYBE_LIBRARY_COMBO}/${GNUSTEP_TARGET_DIR} \
64                 "$basepath"/Library/Images \
65                 "$basepath"/Library/KeyBindings \
66                 "$basepath"/Library/Libraries/${GNUSTEP_TARGET_LDIR} \
67                 "$basepath"/Library/Libraries/Resources \
68                 "$basepath"/Library/Libraries/Java \
69                 "$basepath"/Library/PostScript \
70                 "$basepath"/Library/Services \
71                 "$basepath"/Library/Sounds
72