Code

- Updated fro new Debian upload
[gosa.git] / update-gosa
1 #!/usr/bin/php -q
2 <?php
3 /*
4 /*
5  * This code is part of GOsa (https://gosa.gonicus.de)
6  * Copyright (C) 2005 Jan Wenzel
7  *
8  * This program is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation; either version 2 of the License, or
11  * (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program; if not, write to the Free Software
20  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
21  */
23 $current_dir=trim(`pwd`);
24 include($current_dir.'/include/functions_test.inc');
26 // Build Array of called functions
27 $array= test_defined_functions();
29 // Write List to file
30 $file= $current_dir.'/include/functions_list.inc';
32 // If file does not exist, create it
33 if(!file_exists($file)) {
34         touch($file);
35 }
37 // Write Array to file
38 if(is_writable($file)) {
39         // Open filehandle
40         $fh= fopen($file,'w');
41         if($fh != null) {
42                 fwrite($fh,"return(\n".var_export($array,true).");");
43                 fclose($fh);
44         }
45 }
46 ?>