From: Steven Baltakatei Sandoval <baltakatei@gmail.com>
Date: Fri, 10 Jul 2020 03:00:07 +0000 (+0000)
Subject: feat(unitproc/bktemp-vbm):Added vbm error msg function
X-Git-Tag: 0.3.0~38
X-Git-Url: https://zdv2.bktei.com/gitweb/BK-2020-03.git/commitdiff_plain/a22c56b35412f588ce058c85dfeb02d508b6c278?ds=sidebyside;hp=--cc

feat(unitproc/bktemp-vbm):Added vbm error msg function
---

a22c56b35412f588ce058c85dfeb02d508b6c278
diff --git a/unitproc/bktemp-vbm b/unitproc/bktemp-vbm
new file mode 100644
index 0000000..c7a82b5
--- /dev/null
+++ b/unitproc/bktemp-vbm
@@ -0,0 +1,23 @@
+#!/bin/bash
+# Desc: Display message if optionVerbose true
+
+vbm() {
+    # Description: Prints verbose message ("vbm") to stderr if optionVerbose is set to "true".
+    # Usage: vbm "DEBUG:verbose message here"
+    # Version 0.1.0
+    # Input: arg1: string
+    #        vars: optionVerbose
+    # Output: stderr
+    # Depends: echo
+
+    if [ "$optionVerbose" = "true" ]; then
+	functionTime=$(date --iso-8601=ns); # Save current time in nano seconds.
+	echo "[$functionTime] ""$*" 1>&2; # Display argument text.
+    fi
+
+    # End function
+    return 0; # Function finished.
+} # Verbose message display function.
+
+# Author: Steven Baltakatei Sandoval
+# License: GPLv3+