Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
scripts/bump-pciutils: add beehive mechanics
- point PCIURL to beehive.
- add cron-script for reference
- update database to 2022.03.22
  • Loading branch information
wwwutz committed Mar 22, 2022
1 parent eb3f94e commit bdf98a6
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 4 deletions.
15 changes: 15 additions & 0 deletions 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
5 changes: 2 additions & 3 deletions 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"
Expand Down Expand Up @@ -48,5 +48,4 @@ mee_install() {

IDS=${D}${DATAROOTDIR}/hwdata/pci.ids
cp -v ${F}/pci.ids ${IDS}
grep Version: ${IDS}
}
8 changes: 7 additions & 1 deletion 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

Expand All @@ -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
Expand Down

0 comments on commit bdf98a6

Please sign in to comment.