summaryrefslogtreecommitdiffstats
path: root/snippets/repository-debuginfo.ks
blob: cb246a671a006a51654146d8739ae956196706e6 (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
# %post modifications to enable debuginfo repository

awk '
BEGIN {
  debuginfo = 0
}
  /^\[.*\]/ {
  if (/debuginfo/) {
    debuginfo = 1
  } else {
    debuginfo = 0
  }
  print
  next
}
  /enabled=0/ && debuginfo {
  print "enabled=1"
  next
}
{
  print
  next
}' < /etc/yum.repos.d/fedora.repo > /etc/yum.repos.d/fedora.repo.tmp
mv /etc/yum.repos.d/fedora.repo{.tmp,}