From c88cf45884f691e34c5aade3d1a24936f7d7bcca Mon Sep 17 00:00:00 2001 From: Severin Kaderli Date: Thu, 20 Dec 2018 14:29:06 +0100 Subject: [PATCH] Update utils.sh and watch.sh Signed-off-by: Severin Kaderli --- system/bin/utils.sh | 4 ++-- system/bin/watch.sh | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/system/bin/utils.sh b/system/bin/utils.sh index ed4e877..90b891d 100755 --- a/system/bin/utils.sh +++ b/system/bin/utils.sh @@ -43,8 +43,8 @@ function print_header() { # Function to print a info message with the current time and to send # a notification using notify-send. -# USAGE: print_log TITLE MESSAGE -function print_log() { +# USAGE: print_notify TITLE MESSAGE +function print_notify() { notify-send "${1}" "${2}" echo -e "${YELLOW}[$(date "+%H:%M:%S")] ${1} ${2}${RESET}" } diff --git a/system/bin/watch.sh b/system/bin/watch.sh index d608701..b70ae0c 100755 --- a/system/bin/watch.sh +++ b/system/bin/watch.sh @@ -22,9 +22,9 @@ FILENAME=$(basename "${FILE}") shift COMMAND="${*}" -print_header "Watching ${FILE}" +print_section "Watching ${FILE}" while inotifywait -qq -e close_write "${FILE}"; do - print_log "${FILENAME} has changed" "Executing command" + print_notify "${FILENAME} has changed" "Executing command" $COMMAND done \ No newline at end of file