]> err.no Git - sope/blob - move_obsolete_paths.sh
2c2af93bf59ab08172c1bb015be470ebc949b8b0
[sope] / move_obsolete_paths.sh
1 #!/bin/sh
2 # move_obsolete_paths.sh
3 #
4 # Copyright (C) 2003 Free Software Foundation, Inc.
5 #
6 # Author: Adam Fedor <fedor@doc.com>
7 # Date: April 2003
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 # Move old paths from previous filesystem heirarchy to new location
22
23 if [ -z "$*" ]; then
24   exit 0
25 fi
26
27 for dir in $@; do
28   # 
29   # Move from root to root/Library
30   #
31   subpath=Makefiles
32   if [ -d $dir/$subpath ]; then
33     echo -n "  $dir/$subpath: "
34     if [ -d $dir/Library/$subpath ]; then
35       echo Cannot move. Already exists in new location
36     else
37       mv $dir/$subpath $dir/Library/$subpath
38       echo done
39     fi
40   fi
41
42   subpath=Libraries
43   if [ -d $dir/$subpath ]; then
44     echo -n "  $dir/$subpath: "
45     if [ -d $dir/Library/$subpath ]; then
46       echo Cannot move. Already exists in new location
47     else
48       mv $dir/$subpath $dir/Library/$subpath
49       echo done
50     fi
51   fi
52
53   subpath=Headers
54   if [ -d $dir/$subpath ]; then
55     echo -n "  $dir/$subpath: "
56     if [ -d $dir/Library/$subpath ]; then
57       echo Cannot move. Already exists in new location
58     else
59       mv $dir/$subpath $dir/Library/$subpath
60       echo done
61     fi
62   fi
63
64   subpath=Documentation
65   if [ -d $dir/$subpath ]; then
66     echo -n "  $dir/$subpath: "
67     if [ -d $dir/Library/$subpath ]; then
68       echo Cannot move. Already exists in new location
69     else
70       mv $dir/$subpath $dir/Library/$subpath
71       echo done
72     fi
73   fi
74
75   subpath=Services
76   if [ -d $dir/$subpath ]; then
77     echo -n "  $dir/$subpath: "
78     if [ -d $dir/Library/$subpath ]; then
79       echo Cannot move. Already exists in new location
80     else
81       mv $dir/$subpath $dir/Library/$subpath
82       echo done
83     fi
84   fi
85
86   # 
87   # Move from root/Library/Libraries/Resources to root/Library
88   #
89   resourcedir=$dir/Libraries/Resources
90   subpath=DocTemplates
91   if [ -d $resourcedir/$subpath ]; then
92     echo -n "  $resourcedir/$subpath: "
93     if [ -d $dir/Library/$subpath ]; then
94       echo Cannot move. Already exists in new location
95     else
96       mv $resourcedir/$subpath $dir/Library/$subpath
97       echo done
98     fi
99   fi
100
101   subpath=DTDs
102   if [ -d $resourcedir/$subpath ]; then
103     echo -n "  $resourcedir/$subpath: "
104     if [ -d $dir/Library/$subpath ]; then
105       echo Cannot move. Already exists in new location
106     else
107       mv $resourcedir/$subpath $dir/Library/$subpath
108       echo done
109     fi
110   fi
111
112   subpath=Images
113   if [ -d $resourcedir/$subpath ]; then
114     echo -n "  $resourcedir/$subpath: "
115     if [ -d $dir/Library/$subpath ]; then
116       echo Cannot move. Already exists in new location
117     else
118       mv $resourcedir/$subpath $dir/Library/$subpath
119       echo done
120     fi
121   fi
122
123   subpath=KeyBindings
124   if [ -d $resourcedir/$subpath ]; then
125     echo -n "  $resourcedir/$subpath: "
126     if [ -d $dir/Library/$subpath ]; then
127       echo Cannot move. Already exists in new location
128     else
129       mv $resourcedir/$subpath $dir/Library/$subpath
130       echo done
131     fi
132   fi
133
134   # 
135   # Remove these - will get reinstalled with gnustep-base
136   #
137   subpath=English.lproj
138   if [ -d $resourcedir/$subpath ]; then
139     rm -rf $resourcedir/$subpath
140     echo Removed $resourcedir/$subpath
141   fi
142   subpath=French.lproj
143   if [ -d $resourcedir/$subpath ]; then
144     rm -rf $resourcedir/$subpath
145     echo Removed $resourcedir/$subpath
146   fi
147   subpath=German.lproj
148   if [ -d $resourcedir/$subpath ]; then
149     rm -rf $resourcedir/$subpath
150     echo Removed $resourcedir/$subpath
151   fi
152   subpath=Italian.lproj
153   if [ -d $resourcedir/$subpath ]; then
154     rm -rf $resourcedir/$subpath
155     echo Removed $resourcedir/$subpath
156   fi
157   subpath=Languages
158   if [ -d $resourcedir/$subpath ]; then
159     rm -rf $resourcedir/$subpath
160     echo Removed $resourcedir/$subpath
161   fi
162   subpath=NSCharacterSets
163   if [ -d $resourcedir/$subpath ]; then
164     rm -rf $resourcedir/$subpath
165     echo Removed $resourcedir/$subpath
166   fi
167   subpath=NSTimeZones
168   if [ -d $resourcedir/$subpath ]; then
169     rm -rf $resourcedir/$subpath
170     echo Removed $resourcedir/$subpath
171   fi
172
173   # 
174   # Remove these - will get reinstalled with gnustep-gui
175   #
176   subpath=PrinterTypes
177   if [ -d $resourcedir/$subpath ]; then
178     rm -rf $resourcedir/$subpath
179     echo Removed $resourcedir/$subpath
180   fi
181
182   # 
183   # Remove these - obsolete
184   #
185   #if [ -d $dir/Developer ]; then
186   #  rm -rf $dir/Developer
187   #  echo Removed $dir/Developer
188   #fi
189
190 done