You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
495 B
18 lines
495 B
2 years ago
|
#!/usr/bin/env sh
|
||
|
|
||
|
# A special version of say that prints the text in grey text, indented.
|
||
|
# Use this to show commands before they are executed, to teach those on the path of wizardry.
|
||
|
|
||
2 years ago
|
. colors
|
||
2 years ago
|
|
||
|
wizard_eyes() {
|
||
2 years ago
|
if [ -z $WIZARD ]; then check-wizard; fi
|
||
2 years ago
|
if [ -n "$WIZARD" ] && [ "$WIZARD" -eq 1 ]; then say " ${GREY}${1}${RESET}"; fi
|
||
|
}
|
||
|
|
||
2 years ago
|
# Check if the script is being called from another script
|
||
|
if [ "${BASH_SOURCE[0]}" = "$0" ]; then
|
||
|
# If not, call the function
|
||
|
wizard_eyes "$@"
|
||
|
fi
|