2015-09-08 12:14:57 -07:00
|
|
|
#!/usr/bin/env bash
|
2016-03-01 13:26:35 -08:00
|
|
|
[[ " help plugin:help " == *" $1 "* ]] || exit "$DOKKU_NOT_IMPLEMENTED_EXIT"
|
2015-09-08 12:14:57 -07:00
|
|
|
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
|
|
|
|
|
|
|
|
|
case "$1" in
|
2015-09-09 18:27:42 -07:00
|
|
|
help | plugin:help)
|
2016-03-15 20:03:35 -07:00
|
|
|
help_content_func () {
|
2016-03-22 13:33:12 -07:00
|
|
|
declare desc="return plugin plugin help content"
|
2016-03-15 20:03:35 -07:00
|
|
|
cat<<help_content
|
2015-09-08 12:14:57 -07:00
|
|
|
plugin, Print active plugins
|
2016-01-05 10:43:19 -08:00
|
|
|
plugin:install [--core|git-url [--committish tag|branch|commit|--name custom-plugin-name]], Optionally download git-url (with custom tag/committish) & run install trigger for active plugins (or only core ones)
|
2015-09-09 18:27:42 -07:00
|
|
|
plugin:install-dependencies [--core], Run install-dependencies trigger for active plugins (or only core ones)
|
2016-01-05 10:43:19 -08:00
|
|
|
plugin:update [name [committish]], Optionally update named plugin from git (with custom tag/committish) & run update trigger for active plugins
|
2015-09-08 12:14:57 -07:00
|
|
|
plugin:enable <name>, Enable a previously disabled plugin
|
|
|
|
|
plugin:disable <name>, Disable an installed plugin (third-party only)
|
2015-09-09 18:27:42 -07:00
|
|
|
plugin:uninstall <name>, Uninstall a plugin (third-party only)
|
2016-03-15 20:03:35 -07:00
|
|
|
help_content
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if [[ $1 = "plugin:help" ]] ; then
|
|
|
|
|
echo -e 'Usage: dokku plugin[:COMMAND]'
|
|
|
|
|
echo ''
|
|
|
|
|
echo 'View installed plugins and manage community plugins.'
|
|
|
|
|
echo ''
|
|
|
|
|
echo 'Additional commands:'
|
|
|
|
|
help_content_func | sort | column -c2 -t -s,
|
|
|
|
|
else
|
|
|
|
|
help_content_func
|
|
|
|
|
fi
|
2015-09-08 12:14:57 -07:00
|
|
|
;;
|
|
|
|
|
|
|
|
|
|
*)
|
2016-02-22 10:16:57 -08:00
|
|
|
exit "$DOKKU_NOT_IMPLEMENTED_EXIT"
|
2015-09-08 12:14:57 -07:00
|
|
|
;;
|
|
|
|
|
|
|
|
|
|
esac
|
|
|
|
|
|
|
|
|
|
|