-
Notifications
You must be signed in to change notification settings - Fork 0
/
faf_setup
executable file
·53 lines (36 loc) · 1.11 KB
/
faf_setup
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
47
48
49
50
51
52
#!/bin/bash
ARCH_LIST="src noarch x86_64 i386 i486 i586 i686 armv5tel armv7hl ppc ppc64 s390 s390x"
MIRROR_URL="http://mirror.karneval.cz/pub/linux/fedora/linux"
# add architectures and releases
# ------------------------------
faf archadd $ARCH_LIST
faf opsysadd Fedora
faf pull-releases -o fedora
# add fedora repositories
# -----------------------
tmpdir=$( mktemp -d )
cp repos/*.repo $tmpdir
# replace original URL with our selected mirror
sed -i "s~http://download.fedoraproject.org/pub/fedora/linux~$MIRROR_URL~g" $tmpdir/*.repo
# import repofiles
for repofile in $tmpdir/*.repo; do
faf repoimport dnf $repofile
done
# assign os/debug repositories
for reponame in $( faf repolist | grep -v source ); do
faf repoassign $reponame Fedora i386 x86_64
done
# assign source repositories
for reponame in $( faf repolist | grep source ); do
faf repoassign $reponame Fedora src
done
rm -rf $tmpdir
# print result
# ------------
echo -e "\nSetup complete\n"
echo -e "\nAdded architectures:\n"
faf archlist
echo -e "\nAdded releases:\n"
faf releaselist
echo -e "\nAdded repositories:\n"
faf repolist --detailed