summaryrefslogtreecommitdiff
path: root/profiles/migrate-repo.sh
blob: 5a64cbcce07f74faa19a69ad75b97b6375c6225f (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
#!/bin/bash

echo "Migrate from kits to single repo"

cd /var/git/

if [ -e /var/git/liguros-repo ]
then
    rm -rf /var/git/liguros-repo
fi

git clone https://gitlab.com/liguros/liguros-repo.git

cat <<EOF > /etc/portage/repos.conf/liguros.conf
[DEFAULT]
main-repo = liguros-repo

[liguros-repo]
location = /var/git/liguros-repo
auto-sync = yes
sync-type = git
sync-uri = https://gitlab.com/liguros/liguros-repo.git
priority = 1
EOF

sed -i 's/core-kit/liguros-repo/g' /etc/portage/make.profile/parent 
sed -i '/kits/d' /etc/portage/make.profile/parent

files=(/etc/portage/repos.conf/ego-*)
if [ -e "${files[0]}" ];
then
        rm /etc/portage/repos.conf/ego-*
fi

emerge -q1 =ego-3*
rm -rf /var/git/liguros-repo
ego sync

echo "You still need to change masters = core-kit to masters = liguros-repo in your local overlay/metadata/layout.conf"