Fix output if package is incorrectly named

Thanks to phenixia2003 (SeB) on LQ for the patch.
This commit is contained in:
Robby Workman 2020-11-27 02:57:52 -06:00
parent 775c2fa391
commit 7d8b3382ad

View file

@ -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
}