diff options
author | Remi Collet <remi@remirepo.net> | 2024-01-09 10:12:12 +0100 |
---|---|---|
committer | Remi Collet <remi@php.net> | 2024-01-09 10:12:12 +0100 |
commit | f736f0f51c34b343f4f2f903f93a12aaf2f6b7a4 (patch) | |
tree | 3053ebfbbcbe9dcafdee834586bc754c7ff7c010 /mkview | |
parent | d8cf4e527ceb1c46f7677140de947c6a98dc17f9 (diff) |
optimize mkview
Diffstat (limited to 'mkview')
-rw-r--r-- | mkview/Dockerfile | 2 | ||||
-rw-r--r-- | mkview/mkrepoview | 52 |
2 files changed, 37 insertions, 17 deletions
diff --git a/mkview/Dockerfile b/mkview/Dockerfile index 3209f25..0c8dc16 100644 --- a/mkview/Dockerfile +++ b/mkview/Dockerfile @@ -4,7 +4,7 @@ # podman build -t repoview . # # Usage: -# podman run --mount type=bind,src=/home/rpmbuild/site/rpms,dst=/repo -ti repoview +# podman run --mount type=bind,src=/home/rpmbuild/site/rpms,dst=/repo --rm -ti repoview # FROM registry.access.redhat.com/ubi7:latest diff --git a/mkview/mkrepoview b/mkview/mkrepoview index d528468..11b640f 100644 --- a/mkview/mkrepoview +++ b/mkview/mkrepoview @@ -1,25 +1,45 @@ #!/bin/sh export LANG=C +function createView() { + dep=$1 + + # echo $dep + if [ $dep/repodata -nt $dep/repoview ]; then + cd $dep + nom=${PWD#/repo/} + echo -e "\t$nom" + repoview \ + --url http://rpms.remirepo.net/$nom \ + --template-dir /repo/repotmpl \ + --quiet \ + --title "Remi's RPM repository - ${nom//\// - }" \ + . && touch repoview + cd /repo + fi +} + cd /repo + createView SRPMS - for dep in SRPMS fedora/??/*/{i386,x86_64} enterprise/?/*/{i386,x86_64,armhfp,aarch64} - do - ### [[ $dep =~ /modular ]] && continue - [ -d $dep/headers ] && continue - - if [ $dep/repodata -nt $dep/repoview ]; then - cd $dep - nom=${PWD#/repo/} - echo -e "\t$nom" - repoview \ - --url http://rpms.remirepo.net/$nom \ - --template-dir /repo/repotmpl \ - --quiet \ - --title "Remi's RPM repository - ${nom//\// - }" \ - . && touch repoview - cd /repo + for top in fedora/?? enterprise/{?,??}; do + if [ ! -d $top ]; then + # echo skip $top + continue + fi + if [ -f $top/.closed ]; then + # echo skip $top closed + continue fi + + for dep in $top/*/{i386,x86_64,armhfp,aarch64} + do + [ -d $dep ] || continue + ### [[ $dep =~ /modular ]] && continue + [ -d $dep/headers ] && continue + + createView $dep + done done echo "Done" |