De-refactor the output function in scripts
This commit is contained in:
parent
69b32246c1
commit
62aaa3f73a
|
@ -1,21 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Output colorized strings.
|
||||
#
|
||||
# Usage:
|
||||
#
|
||||
# . $(dirname "$0")/output.sh
|
||||
# output <color> "Foobar"
|
||||
#
|
||||
# Color codes:
|
||||
# 0 - black
|
||||
# 1 - red
|
||||
# 2 - green
|
||||
# 3 - yellow
|
||||
# 4 - blue
|
||||
# 5 - magenta
|
||||
# 6 - cian
|
||||
# 7 - white
|
||||
output() {
|
||||
echo "$(tput setaf "$1")$2$(tput sgr0)"
|
||||
}
|
|
@ -1,7 +1,19 @@
|
|||
#!/bin/sh
|
||||
|
||||
# See output.sh for an explanation of the available color codes.
|
||||
. $(dirname "$0")/output.sh
|
||||
# Output colorized strings
|
||||
#
|
||||
# Color codes:
|
||||
# 0 - black
|
||||
# 1 - red
|
||||
# 2 - green
|
||||
# 3 - yellow
|
||||
# 4 - blue
|
||||
# 5 - magenta
|
||||
# 6 - cian
|
||||
# 7 - white
|
||||
output() {
|
||||
echo "$(tput setaf "$1")$2$(tput sgr0)"
|
||||
}
|
||||
|
||||
if [ ! -d "packages/" ]; then
|
||||
output 1 "./packages doesn't exist!"
|
||||
|
|
|
@ -1,7 +1,19 @@
|
|||
#!/bin/sh
|
||||
|
||||
# See output.sh for an explanation of available the color codes.
|
||||
. $(dirname "$0")/output.sh
|
||||
# Output colorized strings
|
||||
#
|
||||
# Color codes:
|
||||
# 0 - black
|
||||
# 1 - red
|
||||
# 2 - green
|
||||
# 3 - yellow
|
||||
# 4 - blue
|
||||
# 5 - magenta
|
||||
# 6 - cian
|
||||
# 7 - white
|
||||
output() {
|
||||
echo "$(tput setaf "$1")$2$(tput sgr0)"
|
||||
}
|
||||
|
||||
output 6 "Prefixing the appropriate vendor namespaces with Automattic\WooCommerce\Vendor"
|
||||
|
||||
|
|
Loading…
Reference in New Issue