|
|
@ -1,3 +1,4 @@ |
|
|
|
|
|
|
|
|
|
|
|
<?php |
|
|
|
<?php |
|
|
|
/** |
|
|
|
/** |
|
|
|
* Copyright (c) 2013 Bart Visscher <bartv@thisnet.nl> |
|
|
|
* Copyright (c) 2013 Bart Visscher <bartv@thisnet.nl> |
|
|
@ -22,30 +23,30 @@ if (!OC::$CLI) { |
|
|
|
|
|
|
|
|
|
|
|
$self = basename($argv[0]); |
|
|
|
$self = basename($argv[0]); |
|
|
|
if ($argc <= 1) { |
|
|
|
if ($argc <= 1) { |
|
|
|
$argv[1] = "help"; |
|
|
|
$argv[1] = "help"; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
$command = $argv[1]; |
|
|
|
$command = $argv[1]; |
|
|
|
array_shift($argv); |
|
|
|
array_shift($argv); |
|
|
|
|
|
|
|
|
|
|
|
switch ($command) { |
|
|
|
switch ($command) { |
|
|
|
case 'files:scan': |
|
|
|
case 'files:scan': |
|
|
|
require_once 'apps/files/console/scan.php'; |
|
|
|
require_once 'apps/files/console/scan.php'; |
|
|
|
break; |
|
|
|
break; |
|
|
|
case 'status': |
|
|
|
case 'status': |
|
|
|
require_once 'status.php'; |
|
|
|
require_once 'status.php'; |
|
|
|
break; |
|
|
|
break; |
|
|
|
case 'help': |
|
|
|
case 'help': |
|
|
|
echo "Usage:" . PHP_EOL; |
|
|
|
echo "Usage:" . PHP_EOL; |
|
|
|
echo " " . $self . " <command>" . PHP_EOL; |
|
|
|
echo " " . $self . " <command>" . PHP_EOL; |
|
|
|
echo PHP_EOL; |
|
|
|
echo PHP_EOL; |
|
|
|
echo "Available commands:" . PHP_EOL; |
|
|
|
echo "Available commands:" . PHP_EOL; |
|
|
|
echo " files:scan -> rescan filesystem" .PHP_EOL; |
|
|
|
echo " files:scan -> rescan filesystem" .PHP_EOL; |
|
|
|
echo " status -> show some status information" .PHP_EOL; |
|
|
|
echo " status -> show some status information" .PHP_EOL; |
|
|
|
echo " help -> show this help screen" .PHP_EOL; |
|
|
|
echo " help -> show this help screen" .PHP_EOL; |
|
|
|
break; |
|
|
|
break; |
|
|
|
default: |
|
|
|
default: |
|
|
|
echo "Unknown command '$command'" . PHP_EOL; |
|
|
|
echo "Unknown command '$command'" . PHP_EOL; |
|
|
|
echo "For available commands type ". $self . " help" . PHP_EOL; |
|
|
|
echo "For available commands type ". $self . " help" . PHP_EOL; |
|
|
|
break; |
|
|
|
break; |
|
|
|
} |
|
|
|
} |
|
|
|