diff options
author | Robby Workman <rworkman@slackware.com> | 2020-11-27 02:57:52 -0600 |
---|---|---|
committer | Robby Workman <rworkman@slackware.com> | 2020-11-27 02:57:52 -0600 |
commit | 7d8b3382ad99afd4f2ea7f6c9107c4d160148b8c (patch) | |
tree | b03cc8bcc13a7b4e81c417fea2965d5fa384a14a | |
parent | 775c2fa391671dd0885f128a36ed7b5d5b7b8ea3 (diff) | |
download | slackpkg-7d8b3382ad99afd4f2ea7f6c9107c4d160148b8c.tar.xz |
Fix output if package is incorrectly named
Thanks to phenixia2003 (SeB) on LQ for the patch.
-rw-r--r-- | files/pkglist.awk | 9 |
1 files changed, 8 insertions, 1 deletions
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 } |