-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #191 from zebrunner/develop
2.6.4 rc
- Loading branch information
Showing
3 changed files
with
143 additions
and
88 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#!/bin/bash | ||
|
||
#### Debug mode activator | ||
# To use this mode you need to call this file from your code e.g. | ||
# '. /some/path/debug.sh' | ||
# You can use following env vars to control debug mode: | ||
# DEBUG=[true/false] - debug mode (default: false) | ||
# DEBUG_TIMEOUT <seconds> - delay before exit (default: 3600) | ||
# VERBOSE=[true/false] - verbose mode (default: false) | ||
|
||
# Set default value | ||
: ${DEBUG_TIMEOUT:=3600} | ||
|
||
if [[ "${DEBUG}" == "true" ]]; then | ||
echo "#######################################################" | ||
echo "# #" | ||
echo "# DEBUG mode is on! #" | ||
echo "# #" | ||
echo "#######################################################" | ||
trap 'echo "Exit attempt intercepted. Sleep for ${DEBUG_TIMEOUT} seconds activated!"; sleep ${DEBUG_TIMEOUT};' EXIT | ||
fi | ||
|
||
if [[ "${VERBOSE}" == "true" ]]; then | ||
echo "#######################################################" | ||
echo "# #" | ||
echo "# VERBOSE mode is on! #" | ||
echo "# #" | ||
echo "#######################################################" | ||
set -x | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters