summaryrefslogtreecommitdiffstats
path: root/mkview/mkrepoview
blob: 11b640f6363e6a391893f90cf01cbb13a3377858 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#!/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 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"