From 7a0950e004c591b19904fb85f0deee8af089afc2 Mon Sep 17 00:00:00 2001 From: Gerhard Hoffmann Date: Thu, 25 May 2023 17:21:15 +0200 Subject: [PATCH] testing --- .githooks/post-checkout | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/.githooks/post-checkout b/.githooks/post-checkout index 9513a8f..1cc8964 100755 --- a/.githooks/post-checkout +++ b/.githooks/post-checkout @@ -30,13 +30,14 @@ if [ -f $CHECKOUT_HISTORY_FILE ]; then readarray opkg_commands < <(cat $OPKG_COMMANDS_FILE) for opkg_c in "${opkg_commands[@]}"; do # check for empty lines - if ! grep -qE '^[[:space:]]*$' <<< "$opkg_c"; then - echo "CCC=${opkg_c}CCC" - # check if line is not starting with '#' - if ! grep -qE "^\s*[#]+.*$" <<< "$opkg_c"; then - echo -n "EXECUTE, $opkg_c, $now, N/A" | tr -d '\n\r' >> $GIT_UPDATE_LOG 2>&1 - echo "" >> $GIT_UPDATE_LOG 2>&1 - fi + if grep -qE '^$' <<< "$opkg_c"; then + continue + fi + echo "CCC=${opkg_c}CCC" + # check if line is not starting with '#' + if ! grep -qE "^\s*[#]+.*$" <<< "$opkg_c"; then + echo -n "EXECUTE, $opkg_c, $now, N/A" | tr -d '\n\r' >> $GIT_UPDATE_LOG 2>&1 + echo "" >> $GIT_UPDATE_LOG 2>&1 fi done fi