* update iana-etc to 20240814-1
This commit is contained in:
parent
0f248bf540
commit
37a67e01cf
@ -1,16 +1,16 @@
|
||||
pkgbase = iana-etc
|
||||
pkgdesc = /etc/protocols and /etc/services provided by IANA
|
||||
pkgver = 20240612
|
||||
pkgver = 20240814
|
||||
pkgrel = 1
|
||||
url = https://www.iana.org/protocols
|
||||
arch = any
|
||||
license = custom:none
|
||||
backup = etc/protocols
|
||||
backup = etc/services
|
||||
source = https://sources.archlinux.org/other/packages/iana-etc/service-names-port-numbers-20240612.xml
|
||||
source = https://sources.archlinux.org/other/packages/iana-etc/service-names-port-numbers-20240814.xml
|
||||
source = https://sources.archlinux.org/other/packages/iana-etc/protocol-numbers-20240503.xml
|
||||
source = LICENSE
|
||||
sha256sums = 16ad85a7b41d9f4e66d0d874c700ce78b7443804dc871dd398f50754612b8bf1
|
||||
sha256sums = e05d5b388d1fc4a1f96a501ef713c8e55b08ff6c169f7d10b8159d600ed6f516
|
||||
sha256sums = 08090825eabfc99032614b2b6dbc36ebf64e39e3a2c8d5e0a3af1df4a6d4da66
|
||||
sha256sums = dd37e92942d5a4024f1c77df49d61ca77fc6284691814903a741785df61f78cb
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
# Maintainer: Jelle van der Waa <jelle@archlinux.org>
|
||||
|
||||
pkgname=iana-etc
|
||||
pkgver=20240612
|
||||
pkgver=20240814
|
||||
_ports=service-names-port-numbers-${pkgver}
|
||||
_protocols=protocol-numbers-20240503
|
||||
pkgrel=1
|
||||
@ -16,7 +16,7 @@ backup=('etc/'{protocols,services})
|
||||
source=("https://sources.archlinux.org/other/packages/iana-etc/${_ports}.xml"
|
||||
"https://sources.archlinux.org/other/packages/iana-etc/${_protocols}.xml"
|
||||
'LICENSE')
|
||||
sha256sums=('16ad85a7b41d9f4e66d0d874c700ce78b7443804dc871dd398f50754612b8bf1'
|
||||
sha256sums=('e05d5b388d1fc4a1f96a501ef713c8e55b08ff6c169f7d10b8159d600ed6f516'
|
||||
'08090825eabfc99032614b2b6dbc36ebf64e39e3a2c8d5e0a3af1df4a6d4da66'
|
||||
'dd37e92942d5a4024f1c77df49d61ca77fc6284691814903a741785df61f78cb')
|
||||
|
||||
|
37
iana-etc/iana-versioned.sh
Executable file
37
iana-etc/iana-versioned.sh
Executable file
@ -0,0 +1,37 @@
|
||||
#!/usr/bin/bash
|
||||
|
||||
URLS=(
|
||||
https://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xml
|
||||
https://www.iana.org/assignments/protocol-numbers/protocol-numbers.xml
|
||||
)
|
||||
|
||||
DEST=/srv/ftp/other/packages/iana-etc
|
||||
|
||||
curl="curl --silent --fail --location"
|
||||
|
||||
do_update() {
|
||||
url=$1
|
||||
date=$(
|
||||
$curl --head "$url" |
|
||||
sed 's/^Last-Modified: //;t;d' |
|
||||
date -f- +%Y%m%d
|
||||
)
|
||||
if [[ -z $date ]]; then
|
||||
return
|
||||
fi
|
||||
|
||||
file=${url##*/}
|
||||
name=${file%.*}
|
||||
ext=${file##*.}
|
||||
versioned="$name-$date.$ext"
|
||||
|
||||
if [[ ! -f "$versioned" ]]; then
|
||||
$curl --output "$versioned" "$url"
|
||||
fi
|
||||
}
|
||||
|
||||
cd "$DEST"
|
||||
|
||||
for url in ${URLS[@]}; do
|
||||
do_update "$url"
|
||||
done
|
Loading…
x
Reference in New Issue
Block a user