From 95b0fd57c0487cf6cb557fbc63de177099ca867c Mon Sep 17 00:00:00 2001 From: James Rayner Date: Mon, 10 Aug 2009 20:48:31 +1000 Subject: add missing globals and 'arch' hook --- src/hooks/arch | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 src/hooks/arch (limited to 'src/hooks') diff --git a/src/hooks/arch b/src/hooks/arch new file mode 100644 index 0000000..e8f20f1 --- /dev/null +++ b/src/hooks/arch @@ -0,0 +1,38 @@ +. /etc/rc.d/functions + +### Logging/Error reporting for Arch Linux + +function report_err { + printhl "$*" +} + +function report_warn { + printhl "$*" +} + +function report_try { + stat_busy "$*" + REPORT_TRYING=1 +} + +function report_fail { + if [[ -n "$*" ]]; then + if [[ -n "$REPORT_TRYING" ]]; then + stat_append "- $*" + REPORT_TRYING= + stat_fail + else + printhl "$*" + fi + elif [[ -n "$REPORT_TRYING" ]]; then + REPORT_TRYING= + stat_fail + fi +} + +function report_success { + if [[ -n "$*" ]]; then + stat_append "- $*" + fi + stat_done +} -- cgit v1.2.3-24-g4f1b