aboutsummaryrefslogtreecommitdiffstats
path: root/mkhint
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-07-04 09:24:02 +0200
committerDanilo M. <danix@danix.xyz>2026-07-04 09:24:02 +0200
commit11d1c51b97ae830b591c51b874da01de90a083dc (patch)
treeebd0a6a9e8e807dc9e8eb6aa3b9214295602f423 /mkhint
parent64f419d7485cefee854c04c5b49e8adfc5e80531 (diff)
downloadmkhintfile-11d1c51b97ae830b591c51b874da01de90a083dc.tar.gz
mkhintfile-11d1c51b97ae830b591c51b874da01de90a083dc.zip
feat: -l skips versionless hints, widen version columns
--list now skips hint files with no VERSION (e.g. pure DELREQUIRES hints) and excludes them from the total. Version columns widened 10->22 to fit long version strings without shifting other rows. Adds T57. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Diffstat (limited to 'mkhint')
-rwxr-xr-xmkhint6
1 files changed, 4 insertions, 2 deletions
diff --git a/mkhint b/mkhint
index a70e590..90378aa 100755
--- a/mkhint
+++ b/mkhint
@@ -111,7 +111,7 @@ list_hint_files() {
echo "Hint files in: $HINT_DIR"
echo "======================================================="
- printf "%-40s %10s %10s %-20s %s\n" "File" "HintVer" "SBOVer" "Category" "Created"
+ printf "%-40s %22s %22s %-20s %s\n" "File" "HintVer" "SBOVer" "Category" "Created"
echo "-------------------------------------------------------"
MATCHED_PKGS=()
@@ -119,6 +119,8 @@ list_hint_files() {
for file in "$HINT_DIR"/*.hint; do
if [[ -f "$file" ]]; then
local VER; VER=$(grep "^VERSION" "$file" |cut -d '"' -f2)
+ # Skip hints with no VERSION set.
+ [[ -z "$VER" ]] && continue
local name; name=$(basename "$file")
local pkg="${name%.hint}"
local info_file
@@ -131,7 +133,7 @@ list_hint_files() {
fi
local date; date=$(stat -c "%y" "$file" | cut -d'.' -f1)
local row
- row=$(printf "%-40s %10s %10s %-20s %s" "$name" "$VER" "$SBO_VER" "$category" "$date")
+ row=$(printf "%-40s %22s %22s %-20s %s" "$name" "$VER" "$SBO_VER" "$category" "$date")
if [[ -n "$VER" && "$VER" == "$SBO_VER" ]]; then
printf "%s%s%s\n" "$c_on" "$row" "$c_off"
MATCHED_PKGS+=("$pkg")