Skip to content

Commit d1119d6

Browse files
committed
add helpful client debug and verbose output
1 parent 3c8f42f commit d1119d6

1 file changed

Lines changed: 48 additions & 0 deletions

File tree

client/patchman-client

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1155,6 +1155,54 @@ if ${dry_run} ; then
11551155
if [ ! -z "${tags}" ] ; then
11561156
echo "Tags: ${tags}"
11571157
fi
1158+
if ${verbose} ; then
1159+
echo
1160+
echo "=== Packages ==="
1161+
cut -d \' -f 2 "${tmpfile_pkg}" | sort
1162+
echo
1163+
echo "=== Repos ==="
1164+
awk -F\' '{printf " [%s] %s\n", $2, $4}' "${tmpfile_rep}"
1165+
if [ -s "${tmpfile_sec}" ] ; then
1166+
echo
1167+
echo "=== Security Updates ==="
1168+
awk -F\' '{printf " %s %s\n", $2, $4}' "${tmpfile_sec}"
1169+
fi
1170+
if [ -s "${tmpfile_bug}" ] ; then
1171+
echo
1172+
echo "=== Bugfix Updates ==="
1173+
awk -F\' '{printf " %s %s\n", $2, $4}' "${tmpfile_bug}"
1174+
fi
1175+
if [ -s "${tmpfile_mod}" ] ; then
1176+
echo
1177+
echo "=== Modules ==="
1178+
awk -F\' '{printf " %s\n", $2}' "${tmpfile_mod}"
1179+
fi
1180+
fi
1181+
if ${debug} ; then
1182+
if [ "${protocol}" == "2" ] && check_command_exists jq ; then
1183+
tmpfile_packages_json=$(mktemp)
1184+
tmpfile_repos_json=$(mktemp)
1185+
tmpfile_modules_json=$(mktemp)
1186+
tmpfile_sec_json=$(mktemp)
1187+
tmpfile_bug_json=$(mktemp)
1188+
echo
1189+
echo "=== Full JSON Report ==="
1190+
build_json_report
1191+
else
1192+
echo
1193+
echo "=== Raw Data Files ==="
1194+
echo "--- ${tmpfile_pkg} ---"
1195+
cat "${tmpfile_pkg}"
1196+
echo "--- ${tmpfile_rep} ---"
1197+
cat "${tmpfile_rep}"
1198+
echo "--- ${tmpfile_sec} ---"
1199+
cat "${tmpfile_sec}"
1200+
echo "--- ${tmpfile_bug} ---"
1201+
cat "${tmpfile_bug}"
1202+
echo "--- ${tmpfile_mod} ---"
1203+
cat "${tmpfile_mod}"
1204+
fi
1205+
fi
11581206
exit 0
11591207
fi
11601208

0 commit comments

Comments
 (0)