Skip to content

Instantly share code, notes, and snippets.

@enjikaka
Created September 16, 2015 15:22
Show Gist options
  • Save enjikaka/fc4d32986eb5477e2d22 to your computer and use it in GitHub Desktop.
Save enjikaka/fc4d32986eb5477e2d22 to your computer and use it in GitHub Desktop.
+ parse_args trace
+ for arg in '"$@"'
+ case "$arg" in
+ return 0
+ args=("$@")
+ [[ trace =~ ^--.* ]]
+ has_tty
++ /usr/bin/tty
+ [[ /dev/pts/0 == \n\o\t\ \a\ \t\t\y ]]
+ return 0
++ id -un
+ [[ root != \d\o\k\k\u ]]
+ [[ trace != plugins-install* ]]
+ [[ trace != \p\l\u\g\i\n\s\-\u\p\d\a\t\e ]]
+ sudo -u dokku -E -H /usr/local/bin/dokku trace
+ [[ -f /home/dokku/dokkurc ]]
+ source /home/dokku/dokkurc
++ export DOKKU_TRACE=1
++ DOKKU_TRACE=1
+ [[ -d /home/dokku/.dokkurc ]]
+ [[ -n 1 ]]
+ set -x
+ parse_args trace
+ for arg in '"$@"'
+ case "$arg" in
+ return 0
+ args=("$@")
+ [[ trace =~ ^--.* ]]
+ has_tty
++ /usr/bin/tty
+ [[ /dev/pts/0 == \n\o\t\ \a\ \t\t\y ]]
+ return 0
++ id -un
+ [[ dokku != \d\o\k\k\u ]]
+ [[ -n '' ]]
+ case "$1" in
+ implemented=0
+ for script in '$PLUGIN_PATH/*/commands'
+ set +e
+ /var/lib/dokku/plugins/00_dokku-standard/commands trace
++ dirname /var/lib/dokku/plugins/00_dokku-standard/commands
+ source /var/lib/dokku/plugins/00_dokku-standard/../common/functions
++ set -eo pipefail
++ [[ -n 1 ]]
++ set -x
+ case "$1" in
+ [[ -d /home/dokku/.dokkurc ]]
+ [[ '' == \o\n ]]
+ [[ '' == \o\f\f ]]
+ echo 'Valid trace options are [on/off]'
Valid trace options are [on/off]
+ exit 1
+ exit_code=1
+ set -e
+ [[ 1 -eq 10 ]]
+ implemented=1
+ [[ 1 -ne 0 ]]
+ exit 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment