feat: create tar:default alias for tar:help

This commit is contained in:
Jose Diaz-Gonzalez
2017-03-12 21:28:45 -06:00
parent 48503e9f40
commit 0153bc49bc
3 changed files with 34 additions and 18 deletions

View File

@@ -0,0 +1,27 @@
#!/usr/bin/env bash
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
tar_help_content_func() {
declare desc="return tar plugin help content"
cat<<help_content
tar:in <app>, Reads an tarball containing the app from stdin
tar:from <app> <url>, Loads an app tarball from url
help_content
}
tar_help_cmd() {
if [[ $1 = "tar:help" ]] ; then
echo -e 'Usage: dokku tar[:COMMAND]'
echo ''
echo 'An alternative to using git, apps are loaded via tarballs instead.'
echo ''
echo 'Additional commands:'
tar_help_content_func | sort | column -c2 -t -s,
elif [[ $(ps -o command= $PPID) == *"--all"* ]]; then
tar_help_content_func
else
cat<<help_desc
tar, Deploy applications via tarball instead of git
help_desc
fi
}