paritybit.ca

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit 7786b3f754804d2e13e5ec90ee20534047eb1d9b
parent cc66526f5d01cc1d47086690b45419eb27f81c2e
Author: Jake Bauer <jbauer@paritybit.ca>
Date:   Sat, 23 May 2020 20:26:07 -0400

Merge branch 'master' of git.sr.ht:~jbauer/paritybit.ca

Diffstat:
Mcompile | 21++++++++++-----------
1 file changed, 10 insertions(+), 11 deletions(-)

diff --git a/compile b/compile @@ -38,6 +38,12 @@ if [ ! -x "$(command -v pandoc)" ]; then exit 1 fi +# Define colours +CLEAR="\033[0m" +RED="\033[0;31m" +GREEN="\033[0;32m" +YELLOW="\033[0;33m" + # The name of the site in the <title> tags siteName="paritybit.ca" # Set to "false" to disable auto-upload @@ -66,32 +72,25 @@ fi # Prints the message passed as the 1st argument in red. print_error_msg() { - tput sgr0; tput setaf 1 - printf "[ee] %s\n" "$1" - tput sgr0 + printf "$RED[ee] %s\n$CLEAR" "$1" } # Prints the message passed as the 1st argument in green. print_success_msg() { - tput sgr0; tput setaf 2 - printf "[ok] %s\n" "$1" - tput sgr0 + printf "$GREEN[ok] %s\n$CLEAR" "$1" } # Prints the message passed as the 1st argument in yellow. print_header_msg() { - tput sgr0; tput setaf 3 - printf "[hh] %s\n" "$1" - tput sgr0 + printf "$YELLOW[hh] %s\n$CLEAR" "$1" } # Prints the message passed as the 1st argument with default colours. print_info_msg() { - tput sgr0 - printf "[ii] %s\n" "$1" + printf "$CLEAR[ii] %s\n" "$1" } auto_upload()