root/freepbx/trunk/setup_svn.php

Revision 10740, 2.4 kB (checked in by p_lindheimer, 2 years ago)

change path from svn.freepbx.org to www.freepbx.org/v2/svn

  • Property svn:mime-type set to text/plain
  • Property svn:eol-style set to native
  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
Line 
1 #!/usr/bin/php -q
2 <?php
3 //This file is part of FreePBX.
4 //
5 //    FreePBX is free software: you can redistribute it and/or modify
6 //    it under the terms of the GNU General Public License as published by
7 //    the Free Software Foundation, either version 2 of the License, or
8 //    (at your option) any later version.
9 //
10 //    FreePBX is distributed in the hope that it will be useful,
11 //    but WITHOUT ANY WARRANTY; without even the implied warranty of
12 //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 //    GNU General Public License for more details.
14 //
15 //    You should have received a copy of the GNU General Public License
16 //    along with FreePBX.  If not, see <http://www.gnu.org/licenses/>.
17 //
18 //    Copyright 2007, Philippe Lindheimer
19 //
20
21 /** setup_svn.php
22  *
23  *  The purpose of this function is to install all the modules associated with a particular FreePBX version
24  *  under the same path as install_amp. The setup will be similar to how modules are packaged with the
25  *  tarballs when distributed. There are a handful of files that disapear and a few that appear as a
26  *  result of this technique, but all of those files are associated with the packaging of distros and
27  *  not the actual functioning of FreePBX.
28  *
29  *  You can not publish modules from a tree like this. However, you can do svn udpates from the top level
30  *  and then reinstall, and you can make changes in place and do 'svn ci' commands to get them back into
31  *  svn. You will require a 'properly' setup svn pull of the module tree in order to do the final publishing.
32  *
33  *  however, you can use this mode in conjunction with the --make-links-devel install option to get all of your
34  *  modules sym-linked to their final place to make development easier.
35  *
36  */
37 $VERSION = "2.9";
38
39 $NORMAL_URL =  "http://www.freepbx.org/v2/svn/freepbx/branches/$VERSION/amp_conf/htdocs/admin/modules";
40 $MODULE_URL  = "http://www.freepbx.org/v2/svn/modules/branches/$VERSION";
41 $MODULE_PATH = "./amp_conf/htdocs/admin/modules";
42
43 if (isset($argv[1]) && strtolower($argv[1]) == "restore") {
44   system("svn switch $NORMAL_URL $MODULE_PATH");
45 } else {
46   system("svn switch $MODULE_URL $MODULE_PATH");
47 }
48
49
50 /*
51 exec("svn list $MODULE_URL", $modules, $ret);
52
53 if ($ret) {
54   echo "ERROR: svn list returned: $ret\n";
55   exit;
56 } else {
57
58   foreach ($modules as $module) {
59     echo "Checking out $module to $MODULE_PATH/$module\n";
60     system("svn co $MODULE_URL/$module $MODULE_PATH/$module");
61   }
62 }
63 */
64
65 ?>
Note: See TracBrowser for help on using the browser.