diff --git a/cron-checkpciids.sh b/cron-checkpciids.sh new file mode 100755 index 000000000..664fc5595 --- /dev/null +++ b/cron-checkpciids.sh @@ -0,0 +1,15 @@ +#!/bin/bash +http_proxy=beehive:3128 +wget --quiet http://pci-ids.ucw.cz/v2.2/pci.ids -O pci.ids +( cd /usr/share/hwdata && md5sum pci.ids ) > pci.ids.md5 +PCIVER=$(grep -Pom1 '\bVersion:\s*\K\S+' pci.ids) +md5sum --status -c pci.ids.md5 +if [ $? == 1 ]; then + ( + echo + md5sum=($(/src/mariux/md5repo.sh pci.ids)) + echo "cd ~/git/bee-files;scripts/bump-pciutils.sh ${PCIVER} ${md5sum[2]}" + echo + diff {/usr/share/hwdata/,}pci.ids + ) | mailx -s "[cron] please update pci-utils.be0" wwwutz@molgen.mpg.de +fi diff --git a/pciutils.be0 b/pciutils.be0 index da2653fad..a74f525bd 100755 --- a/pciutils.be0 +++ b/pciutils.be0 @@ -1,9 +1,9 @@ #!/usr/bin/env beesh -# BEE_VERSION pciutils-3.7.0.2022.03.14-0 +# BEE_VERSION pciutils-3.7.0.2022.03.22-0 # PCIURL="http://pci-ids.ucw.cz/v2.2/pci.ids" -PCIURL="https://beehive.molgen.mpg.de/8e18d260f95f342dc135567357d4c5ac/pci.ids" # 2022.03.14 +PCIURL="https://beehive.molgen.mpg.de/b6ca17b99d510801ca3b39a27e112ddc/pci.ids" SRCURL[0]="https://beehive.molgen.mpg.de/e6e20482b4f25c5186e6a753c5edc361/pciutils-3.7.0.tar.xz" #SRCURL[0]="https://www.kernel.org/pub/software/utils/pciutils/pciutils-${PKGVERSION[3]}.tar.xz" @@ -48,5 +48,4 @@ mee_install() { IDS=${D}${DATAROOTDIR}/hwdata/pci.ids cp -v ${F}/pci.ids ${IDS} - grep Version: ${IDS} } diff --git a/scripts/bump-pciutils.sh b/scripts/bump-pciutils.sh index e4ed95b86..d46f7e61c 100755 --- a/scripts/bump-pciutils.sh +++ b/scripts/bump-pciutils.sh @@ -1,6 +1,7 @@ #!/bin/bash RELDATE=$1 +MD5SUM=$2 R=0 [[ $RELDATE =~ 2[0-9]{3}.[01][0-9].[0-3][0-9]$ ]] || R=1 @@ -13,7 +14,12 @@ set -x git checkout master git pull git checkout -B update-pciutils-${RELDATE} -sed -ri "/^# BEE_VERSION pciutils-3.7.0./ s/2[0-9]{3}.[01][0-9].[0-3][0-9]/${RELDATE}/" pciutils.be0 +PCIURL="http://pci-ids.ucw.cz/v2.2/pci.ids" + +sed -ri "\ +/^# BEE_VERSION pciutils-3.7.0./ s/2[0-9]{3}.[01][0-9].[0-3][0-9]/${RELDATE}/;\ +/^PCIURL=/ s/[0-9a-f]{32}/${MD5SUM}/ +" pciutils.be0 eval $(beeversion pciutils.be0) set +x