$WEB_ROOT_FS = realpath(dirname(__FILE__));
$BASE_URL = "/";\r
-global $WEB_ROOT_FS, $BASE_URL;
+global $WEB_ROOT_FS, $BASE_URL, $IS_WEB_REQUEST;
+$IS_WEB_REQUEST = false;\r
if(file_exists("../www/config.php")) require_once("../www/config.php");
else if(file_exists("/etc/gwvpmini/config.php")) require_once("/etc/gwvpmini/config.php");
if(file_exists("../gwvpmini/gwvpmini.php")) require_once("../gwvpmini/gwvpmini.php");
else if(file_exists("/usr/share/gwvpmini/lib/gwvpmini/gwvpmini.php")) require_once("/usr/share/gwvpmini/lib/gwvpmini/gwvpmini.php");
-global $IS_WEB_REQUEST;
+if(isset($argv["1"])) {
+ switch($argv["1"]) {
+ case "updatehook":
+ gwvpcmdtool_UpdateHook();
+ break;
+ default:
+ gwvpcmdtool_Usage();
+ }
+} else gwvpcmdtool_Usage();
+return;
-$IS_WEB_REQUEST = false;
+
+function gwvpcmdtool_Usage()
+{
+ global $argv;
+
+ echo "Usage: ".$argv[0]."\n";
+ echo "\tupdatehook <user> <ref> <firstupdate> <lastupdate>\n";
+}
+
+function gwvpcmdtool_UpdateHook()
+{
+
+}
?>
\ No newline at end of file