diff --git a/.githooks/post-checkout b/.githooks/post-checkout index 1e6e26e..9513a8f 100755 --- a/.githooks/post-checkout +++ b/.githooks/post-checkout @@ -29,8 +29,8 @@ if [ -f $CHECKOUT_HISTORY_FILE ]; then if grep -q . "${OPKG_COMMANDS_FILE}"; then readarray opkg_commands < <(cat $OPKG_COMMANDS_FILE) for opkg_c in "${opkg_commands[@]}"; do - # check for empty lines - if [ "$opkg_c" ]; then + # 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