aboutsummaryrefslogtreecommitdiff
path: root/hooks/news_TEST_setup.sh
blob: 5925060640383d4b9e693793fb4dcb59d85f6b0d (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
47
48
49
50
51
52
53
#!/usr/bin/env bash
# vim: set ft=sh sw=4 sts=4 et :

mkdir -p news_TEST_dir || exit 1
cd news_TEST_dir || exit 1

mkdir -p one/.paludis/repositories/ || exit 1

cat <<END > one/.paludis/repositories/one.conf
location = `pwd`/repo1
cache = /var/empty
format = e
names_cache = /var/empty
profiles = \${location}/profiles/testprofile
END

mkdir -p two/.paludis/repositories/ || exit 1

cat <<END > two/.paludis/repositories/one.conf
location = `pwd`/repo1
cache = /var/empty
format = e
names_cache = /var/empty
profiles = \${location}/profiles/testprofile
END

cat <<END > two/.paludis/repositories/two.conf
location = `pwd`/repo2
cache = /var/empty
format = e
names_cache = /var/empty
profiles = \${location}/profiles/testprofile
END

mkdir -p var/lib/gentoo/news
cat <<END > var/lib/gentoo/news/news-one.read
END
cat <<END > var/lib/gentoo/news/news-one.unread
END
cat <<END > var/lib/gentoo/news/news-two.read
END
cat <<END > var/lib/gentoo/news/news-two.unread
monkey
END

mkdir -p repo1/profiles/testprofile
echo one > repo1/profiles/repo_name

mkdir -p repo2/profiles/testprofile
echo two > repo2/profiles/repo_name

cd ..