clockwerk-www – Blame information for rev

Subversion Repositories:
Rev:
Rev Author Line No. Line
5 vero 1 #!/bin/bash
2  
3 #
4 # Setup helper scripts for OpenSim/Aurora-Sim
5 # by Fumi.Iseki
6 #
7  
8 LANG=C
9 COMMAND="$0"
10  
11 ALL_SCRIPT="NO"
12 SYMBL_LINK="YES"
13 ONLY_DWNLD="NO"
14  
15 SHOW_HELP="NO"
16  
17  
18 while [ $# != 0 ]; do
19 if [ "$1" = "-a" -o "$1" = "--all" ]; then
20 ALL_SCRIPT='YES'
21 elif [ "$1" = "-c" -o "$1" = "--copy" ]; then
22 SYMBL_LINK="NO"
23 elif [ "$1" = "-d" -o "$1" = "--download" ]; then
24 ONLY_DWNLD="YES"
25 elif [ "$1" = "-h" -o "$1" = "--help" ]; then
26 SHOW_HELP="YES"
27 fi
28  
29 shift
30 done
31  
32  
33 if [ "$SHOW_HELP" = "YES" ]; then
34 echo
35 echo "usage... $COMMAND [-c/--copy] [-d/--download] [-a/--all] [-h/--help]"
36 echo "-c or --copy : not symbolic link but copy files"
37 echo "-d or --download : download only"
38 echo "-a or --all : treat all scripts include optional scripts"
39 echo "-h or --help : show this help"
40 echo
41 exit 0
42 fi
43  
44  
45 if [ "$SYMBL_LINK" = "NO" ]; then
46 if [ -f include/config.php -a ! -L include/config.php ]; then
47 mv -f include/config.php 'config.php.temp.$$$'
48 fi
49 rm -rf helper
50 rm -rf include
51 fi
52  
53 mkdir -p helper
54 mkdir -p include
55  
56 if [ "$SYMBL_LINK" = "NO" ]; then
57 if [ -f 'config.php.temp.$$$' -a ! -L 'config.php.temp.$$$' ]; then
58 mv -f 'config.php.temp.$$$' include/config.php
59 fi
60 fi
61  
62  
63  
64 ########################################################################
65 # Basic Scripts
66  
67 # download flotsam_XmlRpcGroup
68 if [ -d flotsam_XmlRpcGroup ]; then
69 svn update flotsam_XmlRpcGroup
70 else
71 svn co http://www.nsl.tuis.ac.jp/svn/opensim/flotsam_XmlRpcGroup/trunk flotsam_XmlRpcGroup
72 fi
73  
74 if [ "$ONLY_DWNLD" = "NO" ]; then
75 if [ "$SYMBL_LINK" = "YES" ]; then
76 ln -sf ../flotsam_XmlRpcGroup/groups.sql helper/groups.sql
77 ln -sf ../flotsam_XmlRpcGroup/xmlgroups.php helper/xmlgroups.php
78 ln -sf ../flotsam_XmlRpcGroup/xmlgroups_config.php helper/xmlgroups_config.php
79 ln -sf ../flotsam_XmlRpcGroup/xmlrpc.php helper/xmlrpc.php
80 if [ -d helper/phpxmlrpclib ]; then
81 rm -rf helper/phpxmlrpclib
82 fi
83 ln -sf ../flotsam_XmlRpcGroup/phpxmlrpclib helper/phpxmlrpclib
84 elif [ "$SYMBL_LINK" = "NO" ]; then
85 cp -puf flotsam_XmlRpcGroup/groups.sql helper/groups.sql
86 cp -puf flotsam_XmlRpcGroup/xmlgroups.php helper/xmlgroups.php
87 cp -puf flotsam_XmlRpcGroup/xmlgroups_config.php helper/xmlgroups_config.php
88 cp -puf flotsam_XmlRpcGroup/xmlrpc.php helper/xmlrpc.php
89 cp -Rpdf flotsam_XmlRpcGroup/phpxmlrpclib helper/phpxmlrpclib
90 fi
91 fi
92  
93  
94 # download opensimwiredux
95 if [ -d opensimwiredux ]; then
96 svn update opensimwiredux
97 else
98 svn co http://www.nsl.tuis.ac.jp/svn/opensim/opensimwiredux/trunk opensimwiredux
99 fi
100  
101 if [ "$ONLY_DWNLD" = "NO" ]; then
102 if [ "$SYMBL_LINK" = "YES" ]; then
103 ln -sf ../opensimwiredux/currency.php helper/currency.php
104 ln -sf ../opensimwiredux/landtool.php helper/landtool.php
105 ln -sf ../opensimwiredux/helpers.php helper/helpers.php
106 ln -sf ../opensimwiredux/offline.php helper/offline.php
107 ln -sf ../opensimwiredux/mysql.php include/mysql.func.php
108 elif [ "$SYMBL_LINK" = "NO" ]; then
109 cp -puf opensimwiredux/currency.php helper/currency.php
110 cp -puf opensimwiredux/landtool.php helper/landtool.php
111 cp -puf opensimwiredux/helpers.php helper/helpers.php
112 cp -puf opensimwiredux/offline.php helper/offline.php
113 cp -puf opensimwiredux/mysql.php include/mysql.func.php
114 fi
115 fi
116  
117  
118 # download opensim.phplib
119 if [ -d opensim.phplib ]; then
120 svn update opensim.phplib
121 else
122 svn co http://www.nsl.tuis.ac.jp/svn/opensim/opensim.phplib/trunk opensim.phplib
123 fi
124  
125 if [ "$ONLY_DWNLD" = "NO" ]; then
126 if [ "$SYMBL_LINK" = "YES" ]; then
127 ln -sf ../opensim.phplib/env.mysql.php include/env.mysql.php
128 ln -sf ../opensim.phplib/opensim.mysql.php include/opensim.mysql.php
129 ln -sf ../opensim.phplib/tools.func.php include/tools.func.php
130 elif [ "$SYMBL_LINK" = "NO" ]; then
131 cp -puf opensim.phplib/env.mysql.php include/env.mysql.php
132 cp -puf opensim.phplib/opensim.mysql.php include/opensim.mysql.php
133 cp -puf opensim.phplib/tools.func.php include/tools.func.php
134 fi
135 fi
136  
137  
138  
139 ########################################################################
140 # Optional Scripts
141  
142 if [ "$ALL_SCRIPT" = "YES" ]; then
143  
144 # download nsl.modules
145 if [ -d nsl.modules ]; then
146 svn update nsl.modules
147 else
148 svn co http://www.nsl.tuis.ac.jp/svn/opensim/opensim.nsl.modules/trunk nsl.modules
149 fi
150  
151 if [ "$ONLY_DWNLD" = "NO" ]; then
152 if [ "$SYMBL_LINK" = "YES" ]; then
153 ln -sf ../nsl.modules/php/mute.php helper/mute.php
154 elif [ "$SYMBL_LINK" = "NO" ]; then
155 cp -puf nsl.modules/php/mute.php helper/mute.php
156 fi
157 fi
158  
159  
160 # download osprofile
161 if [ -d osprofile ]; then
162 svn update osprofile
163 else
164 svn co http://www.nsl.tuis.ac.jp/svn/opensim/opensim.osprofile/trunk osprofile
165 fi
166  
167 if [ "$ONLY_DWNLD" = "NO" ]; then
168 if [ "$SYMBL_LINK" = "YES" ]; then
169 ln -sf ../osprofile/webroot/profile.php helper/profile.php
170 ln -sf ../osprofile/webroot/profile_config.php helper/profile_config.php
171 elif [ "$SYMBL_LINK" = "NO" ]; then
172 cp -puf osprofile/webroot/profile.php helper/profile.php
173 cp -puf osprofile/webroot/profile_config.php helper/profile_config.php
174 fi
175 fi
176  
177  
178 # download ossearch
179 if [ -d ossearch ]; then
180 svn update ossearch
181 else
182 svn co http://www.nsl.tuis.ac.jp/svn/opensim/opensim.ossearch/trunk ossearch
183 fi
184  
185 if [ "$ONLY_DWNLD" = "NO" ]; then
186 if [ "$SYMBL_LINK" = "YES" ]; then
187 ln -sf ../ossearch/webroot/parser.php helper/parser.php
188 ln -sf ../ossearch/webroot/query.php helper/query.php
189 ln -sf ../ossearch/webroot/register.php helper/register.php
190 ln -sf ../ossearch/webroot/search_config.php helper/search_config.php
191 elif [ "$SYMBL_LINK" = "NO" ]; then
192 cp -puf ossearch/webroot/parser.php helper/parser.php
193 cp -puf ossearch/webroot/query.php helper/query.php
194 cp -puf ossearch/webroot/register.php helper/register.php
195 cp -puf ossearch/webroot/search_config.php helper/search_config.php
196 fi
197 fi
198  
199  
200 fi # ALL_SCRIPT
201  
202  
203  
204 ########################################################################
205 #
206  
207 if [ "$ONLY_DWNLD" = "NO" ]; then
208 if [ "$SYMBL_LINK" = "YES" ]; then
209 ln -sf ../config/cron.php include/cron.php
210 ln -sf ../config/env_interface.php include/env_interface.php
211 ln -sf ../config/index.html helper/index.html
212 ln -sf ../config/index.html include/index.html
213 if [ ! -f include/config.php ]; then
214 ln -sf ../config/config.php include/config.php
215 fi
216 elif [ "$SYMBL_LINK" = "NO" ]; then
217 cp -puf config/cron.php include/cron.php
218 cp -puf config/env_interface.php include/env_interface.php
219 cp -puf config/index.html helper/index.html
220 cp -puf config/index.html include/index.html
221 if [ ! -f include/config.php ]; then
222 cp -puf config/config.php include/config.php
223 fi
224 fi
225 fi
226