summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMorris Jobke <morris.jobke@gmail.com>2013-08-05 06:07:27 -0700
committerMorris Jobke <morris.jobke@gmail.com>2013-08-05 06:07:27 -0700
commitf55fbc90933d51c509a27dcb0f82888bfb020f04 (patch)
treece2a8e9e3c3e900a2c397fe28dccd11e0c64fa6b
parent0fce89308e2fbcb44a2091ca67f373ba89ee068e (diff)
parent2871d11b5c1148909787d9bca732dfcd1fcbfc5d (diff)
downloadnextcloud-server-f55fbc90933d51c509a27dcb0f82888bfb020f04.tar.gz
nextcloud-server-f55fbc90933d51c509a27dcb0f82888bfb020f04.zip
Merge pull request #4320 from owncloud/adding-executable-occ-master
adding executable script occ (ownCloud console)
-rw-r--r--console.php4
-rwxr-xr-xocc11
2 files changed, 13 insertions, 2 deletions
diff --git a/console.php b/console.php
index 538837a04b4..4aec5bdc24f 100644
--- a/console.php
+++ b/console.php
@@ -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
index 00000000000..e2b71fe4abc
--- /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';