summaryrefslogtreecommitdiffstats
path: root/scripts/library
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/library')
-rw-r--r--scripts/library/output_format.sh21
1 files changed, 21 insertions, 0 deletions
diff --git a/scripts/library/output_format.sh b/scripts/library/output_format.sh
new file mode 100644
index 00000000..9e890e76
--- /dev/null
+++ b/scripts/library/output_format.sh
@@ -0,0 +1,21 @@
+msg() {
+ (( QUIET )) && return
+ local mesg=$1; shift
+ printf "==> ${mesg}\n" "$@" >&1
+}
+
+msg2() {
+ (( QUIET )) && return
+ local mesg=$1; shift
+ printf " -> ${mesg}\n" "$@" >&1
+}
+
+warning() {
+ local mesg=$1; shift
+ printf "==> $(gettext "WARNING:") ${mesg}\n" "$@" >&2
+}
+
+error() {
+ local mesg=$1; shift
+ printf "==> $(gettext "ERROR:") ${mesg}\n" "$@" >&2
+} \ No newline at end of file