2017-10-19 20:49:43 +02:00
|
|
|
!/source\// && !/\.asc$/ {
|
|
|
|
INPUT=$NF
|
|
|
|
fs=FS
|
|
|
|
FS="/" ; OFS="/"
|
|
|
|
$0=INPUT
|
2017-12-30 08:06:40 +01:00
|
|
|
if ( $(NF-3) != "var" ) {
|
2017-10-19 20:49:43 +02:00
|
|
|
DIR=$2
|
|
|
|
FULLPACK=$NF
|
|
|
|
} else {
|
|
|
|
DIR="local"
|
|
|
|
FULLPACK=$NF".tgz"
|
|
|
|
}
|
|
|
|
NF=NF-1
|
|
|
|
PATH=$0
|
|
|
|
FS="-" ; OFS="-"
|
|
|
|
$0=FULLPACK
|
|
|
|
if ( NF > 3 ) {
|
|
|
|
SIZE=split($NF,RELEXT,".")
|
|
|
|
EXTENSION=RELEXT[SIZE]
|
|
|
|
LAST=length($NF)-4
|
|
|
|
RELEASE=substr($NF,1,LAST)
|
|
|
|
ARCH=$(NF-1)
|
|
|
|
VERSION=$(NF-2)
|
|
|
|
NF=NF-3
|
|
|
|
NAME=$0
|
2020-11-27 09:57:52 +01:00
|
|
|
|
|
|
|
PKGNAME=NAME"-"VERSION"-"ARCH"-"RELEASE
|
|
|
|
if (VERSION == "") { VERSION="UNKNOWN" ; }
|
|
|
|
if (ARCH == "") { ARCH= "UNKNOWN" ; }
|
|
|
|
if (RELEASE == "") { RELEASE= "UNKNOWN" ; }
|
2017-10-19 20:49:43 +02:00
|
|
|
} else {
|
|
|
|
RELEASE=none
|
|
|
|
ARCH=none
|
|
|
|
VERSION=none
|
|
|
|
EXTENSION=tgz
|
|
|
|
NAME=$0
|
2020-11-27 09:57:52 +01:00
|
|
|
|
|
|
|
PKGNAME=NAME"-"VERSION"-"ARCH"-"RELEASE
|
2017-10-19 20:49:43 +02:00
|
|
|
}
|
|
|
|
FS=fs
|
2020-11-27 09:57:52 +01:00
|
|
|
print DIR" "NAME" "VERSION" "ARCH" "RELEASE" "PKGNAME" "PATH" "EXTENSION
|
2017-10-19 20:49:43 +02:00
|
|
|
}
|