]> source.dussan.org Git - nextcloud-server.git/commitdiff
adding executable script occ (ownCloud console)
authorThomas Müller <thomas.mueller@tmit.eu>
Mon, 5 Aug 2013 12:03:11 +0000 (14:03 +0200)
committerThomas Müller <thomas.mueller@tmit.eu>
Mon, 5 Aug 2013 12:03:11 +0000 (14:03 +0200)
console.php
occ [new file with mode: 0755]

index 538837a04b49cb8ff338b7e4d1b299a61847a26d..4aec5bdc24ffe1bb32ca0ddb0d9bc8f1b4499457 100644 (file)
@@ -20,9 +20,9 @@ if (!OC::$CLI) {
        exit(0);
 }
 
-if ($argc < 1) {
+if ($argc <= 1) {
        echo "Usage:" . PHP_EOL;
-       echo " php console.php <command>" . PHP_EOL;
+       echo " " . basename($argv[0]) . " <command>" . PHP_EOL;
        exit(0);
 }
 
diff --git a/occ b/occ
new file mode 100755 (executable)
index 0000000..e2b71fe
--- /dev/null
+++ b/occ
@@ -0,0 +1,11 @@
+#!/usr/bin/php
+<?php
+/**
+ * Copyright (c) 2013 Thomas Müller <thomas.mueller@tmit.eu>
+ * This file is licensed under the Affero General Public License version 3 or
+ * later.
+ * See the COPYING-README file.
+ */
+
+//$argv = $_SERVER['argv'];
+require_once __DIR__ . '/console.php';