test for syntax errors
This commit is contained in:
parent
a7df379b6c
commit
050deba0bd
@ -29,15 +29,14 @@ if [ -f $CHECKOUT_HISTORY_FILE ]; then
|
|||||||
if grep -q . "${OPKG_COMMANDS_FILE}"; then
|
if grep -q . "${OPKG_COMMANDS_FILE}"; then
|
||||||
readarray opkg_commands < <(cat $OPKG_COMMANDS_FILE)
|
readarray opkg_commands < <(cat $OPKG_COMMANDS_FILE)
|
||||||
for opkg_c in "${opkg_commands[@]}"; do
|
for opkg_c in "${opkg_commands[@]}"; do
|
||||||
if [ -z "$opkg_c" ]; then
|
# check for empty lines
|
||||||
continue
|
if [ -n "$opkg_c" ]; then
|
||||||
fi
|
# check if line is not starting with '#'
|
||||||
next_line=$(grep -E "^\s*[#]+.*$" <<< "$opkg_c")
|
if ! grep -qE "^\s*[#]+.*$" <<< "$opkg_c"; then
|
||||||
if ! [ -z "$next_line" ]; then
|
|
||||||
continue
|
|
||||||
fi
|
|
||||||
echo -n "EXECUTE, $opkg_c, $now, N/A" | tr -d '\n\r' >> $GIT_UPDATE_LOG 2>&1
|
echo -n "EXECUTE, $opkg_c, $now, N/A" | tr -d '\n\r' >> $GIT_UPDATE_LOG 2>&1
|
||||||
echo "" >> $GIT_UPDATE_LOG 2>&1
|
echo "" >> $GIT_UPDATE_LOG 2>&1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user