forked from YesWiki/yeswiki
-
Notifications
You must be signed in to change notification settings - Fork 0
/
yeswicli
executable file
·39 lines (33 loc) · 1.53 KB
/
yeswicli
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/usr/bin/env bash
SOURCE="${BASH_SOURCE[0]}"
# If the current source is a symbolic link, we need to resolve it to an
# actual directory name. We'll use PHP to do this easier than we can
# do it in pure Bash. So, we'll call into PHP CLI here to resolve.
if [[ -L "$SOURCE" ]]
then
DIR=$(php -r "echo dirname(realpath('$SOURCE'));")
else
DIR="$( cd "$( dirname "$SOURCE" )" && pwd )"
fi
# If we are in the global Composer "bin" directory, we need to bump our
# current directory up two, so that we will correctly proxy into the
# YesWiki CLI script which is written in PHP. Will use PHP to do it.
if [ ! -f "$DIR/yeswicli" ]
then
DIR=$(php -r "echo realpath('$DIR/../YesWiki/yeswiki');")
fi
php $DIR/includes/commands/console $@
# TODO : add those commands
# extension
# extension:disable disable an extension
# extension:enable enable an extension
# extension:install install an extension
# extension:list List all available extensions
# extension:remove remove an extension
# extension:update update an extension or all extensions
# config
# config:import Import a list of configs
# config:list List all configs
# config:value:delete Delete a system config value
# config:value:get Get a system config value
# config:value:set Set a system config value