diff --git a/.githooks/post-checkout b/.githooks/post-checkout index 2a61f62..ab830c8 100755 --- a/.githooks/post-checkout +++ b/.githooks/post-checkout @@ -1,3 +1,4 @@ +#!/bin/bash - # echo "POST-CHECKOUT" # echo "PREV-HEAD=$1" # echo "CURR-HEAD=$2" @@ -25,9 +26,7 @@ if [ -f $CHECKOUT_HISTORY_FILE ]; then echo "DOWNLOAD, /etc/psa_config/DC2C_print04.json, $now, N/A" >> $GIT_UPDATE_LOG echo "DOWNLOAD, /etc/psa_config/DC2C_print29.json, $now, N/A" >> $GIT_UPDATE_LOG echo "DOWNLOAD, /etc/psa_config/DC2C_print32.json, $now, N/A" >> $GIT_UPDATE_LOG - if [ $(wc -l < "$OPKG_COMMANDS_FILE") -gt 0 ]; then - # file not empty - # mark opkg_commdands to be executed by update-tool. + if grep -q . "${OPKG_COMMANDS_FILE}"; then readarray opkg_commands < <(cat $OPKG_COMMANDS_FILE) for opkg_c in "${opkg_commands[@]}"; do test -z $opkg_c && continue;