Skip to content

Commit e54251c

Browse files
committed
Added xataface CLI script in bin/xataface which will serve as the central access point for all CLI functionality. It delegates to the tools/xataface.php script, which further delegates to other scripts. Currently only service and create commands are wrapped, but will be mapping others soon.
1 parent c3d44fe commit e54251c

File tree

6 files changed

+766
-648
lines changed

6 files changed

+766
-648
lines changed

bin/xataface

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/bin/sh
2+
set -e
3+
SCRIPTPATH="$( cd "$(dirname "$0")" ; pwd -P )"
4+
export XATAFACE="$SCRIPTPATH/.."
5+
php "$SCRIPTPATH/../tools/xataface.php" $@

tools/clone.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
ini_set('display_errors', 'on');
33
error_reporting(E_ALL);
44

5-
if (!@$argv) {
5+
if (php_sapi_name() != "cli") {
66
fwrite(STDERR, "CLI ONLY");
77
exit(1);
88
}

0 commit comments

Comments
 (0)