Merge branch 'zg1/zone2' of git.mimbach49.de:GerhardHoffmann/customer_281 into zg1/zone2

This commit is contained in:
Siegfried Siegert 2023-06-19 10:37:27 +02:00
commit fe7c8bf282
Signed by: SiegfriedSiegert
GPG Key ID: 68371E015E8F0B03

View File

@ -19,29 +19,32 @@ write_log_file () {
if ! grep -Eq "$line" $CHECKOUT_HISTORY_FILE; then
# line not found. first checkout of this branch (on this PSA).
# mark dc and print-templates to be downloaded by update-tool.
echo "DOWNLOAD, /etc/dc/dc2c.4.21.bin, $now, N/A" >> $GIT_UPDATE_LOG
echo "DOWNLOAD, /etc/dc/dc2c.bin, $now, N/A" >> $GIT_UPDATE_LOG
echo "DOWNLOAD, /etc/psa_config/DC2C_print01.json, $now, N/A" >> $GIT_UPDATE_LOG
echo "DOWNLOAD, /etc/psa_config/DC2C_print02.json, $now, N/A" >> $GIT_UPDATE_LOG
echo "DOWNLOAD, /etc/psa_config/DC2C_print03.json, $now, N/A" >> $GIT_UPDATE_LOG
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 grep -qE . "${OPKG_COMMANDS_FILE}"; then
readarray opkg_commands < <(cat $OPKG_COMMANDS_FILE)
for opkg_c in "${opkg_commands[@]}"; do
# check for lines longer than 'opkg '
if [ "${#opkg_c}" -gt 4 ]; then
# comment: spaces, at least one '#'
grep -qE '^[[:space:]]*#+.*$' <<< "$opkg_c" && continue
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
if [ -f "$OPKG_COMMANDS_FILE" ]; then
if grep -qE . "${OPKG_COMMANDS_FILE}"; then
readarray opkg_commands < <(cat $OPKG_COMMANDS_FILE)
for opkg_c in "${opkg_commands[@]}"; do
# check for lines longer than 'opkg '
if [ "${#opkg_c}" -gt 4 ]; then
# comment: spaces, at least one '#'
grep -qE '^[[:space:]]*#+.*$' <<< "$opkg_c" && continue
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
fi
else
echo "Found existing line: $line. Do nothing"
fi
echo "$line @$now" >> $CHECKOUT_HISTORY_FILE
echo "$line" >> $CHECKOUT_HISTORY_FILE
# echo "$line @$now" >> $CHECKOUT_HISTORY_FILE
else
echo "*******************************************************"
echo " $CHECKOUT_HISTORY_FILE DOES NOT EXIST !!! "