Files
dokku/plugins/tar/internal-functions
Jose Diaz-Gonzalez 1cb586b2e7 refactor: standardize command naming
This standardization makes it somewhat easier to read stacktraces as the command names are all uniform, so it will be slightly easier to scan trace output.
2020-02-09 22:41:39 -05:00

29 lines
760 B
Bash
Executable File

#!/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
}
cmd-tar-help() {
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
}