From 7d8b3382ad99afd4f2ea7f6c9107c4d160148b8c Mon Sep 17 00:00:00 2001 From: Robby Workman Date: Fri, 27 Nov 2020 02:57:52 -0600 Subject: Fix output if package is incorrectly named Thanks to phenixia2003 (SeB) on LQ for the patch. --- files/pkglist.awk | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'files') diff --git a/files/pkglist.awk b/files/pkglist.awk index 9b4b1bc..c406580 100644 --- a/files/pkglist.awk +++ b/files/pkglist.awk @@ -23,13 +23,20 @@ VERSION=$(NF-2) NF=NF-3 NAME=$0 + + PKGNAME=NAME"-"VERSION"-"ARCH"-"RELEASE + if (VERSION == "") { VERSION="UNKNOWN" ; } + if (ARCH == "") { ARCH= "UNKNOWN" ; } + if (RELEASE == "") { RELEASE= "UNKNOWN" ; } } else { RELEASE=none ARCH=none VERSION=none EXTENSION=tgz NAME=$0 + + PKGNAME=NAME"-"VERSION"-"ARCH"-"RELEASE } FS=fs - print DIR" "NAME" "VERSION" "ARCH" "RELEASE" "NAME"-"VERSION"-"ARCH"-"RELEASE" "PATH" "EXTENSION + print DIR" "NAME" "VERSION" "ARCH" "RELEASE" "PKGNAME" "PATH" "EXTENSION } -- cgit v1.2.3