3d23011339b51fc0ffac92853163de058b29edc4
[gwvp-mini.git] / bin / gwvpminicmdtool.php
1 <?php
2
3 $WEB_ROOT_FS = realpath(dirname(__FILE__));
4 $BASE_URL = "/";\r
5
6 global $WEB_ROOT_FS, $BASE_URL, $IS_WEB_REQUEST;
7 $IS_WEB_REQUEST = false;\r
8
9 if(file_exists("../www/config.php")) require_once("../www/config.php");
10 else if(file_exists("/etc/gwvpmini/config.php")) require_once("/etc/gwvpmini/config.php");
11 else $noconfig = true;
12
13 if(file_exists("../gwvpmini/gwvpmini.php")) require_once("../gwvpmini/gwvpmini.php");
14 else if(file_exists("/usr/share/gwvpmini/lib/gwvpmini/gwvpmini.php")) require_once("/usr/share/gwvpmini/lib/gwvpmini/gwvpmini.php");
15
16 if(isset($argv["1"])) {
17         switch($argv["1"]) {
18                 case "updatehook":
19                         gwvpcmdtool_UpdateHook();
20                         break;
21                 default:
22                         gwvpcmdtool_Usage();
23         }
24 } else gwvpcmdtool_Usage();
25 return;
26
27
28
29 function gwvpcmdtool_Usage()
30 {
31         global $argv;
32         
33         echo "Usage: ".$argv[0]."\n";
34         echo "\tupdatehook <user> <ref> <firstupdate> <lastupdate>\n";
35 }
36
37 function gwvpcmdtool_UpdateHook()
38 {
39         
40 }
41 ?>