-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest_user_repos.bats
39 lines (38 loc) · 1.21 KB
/
test_user_repos.bats
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
#!/usr/bin/env bats
@test "test user repos" {
. ./rollarch
repos="arcanisrepo dvzrv eschwartz herecura quarry seblu xyne-x86_64"
rollarch_additional_repo_names_possible="
[arcanisrepo]
Server = https://repo.arcanis.me/repo/\$arch
[dvzrv]
Server = https://pkgbuild.com/~dvzrv/repo/\$arch
[eschwartz]
Server = https://pkgbuild.com/~eschwartz/repo/\$arch
[herecura]
Server = https://repo.herecura.be/\$repo/\$arch
[quarry]
Server = https://pkgbuild.com/~anatolik/quarry/x86_64/
[blackeagle-pre-community]
Server = https://repo.herecura.be/\$repo/\$arch
[seblu]
Server = https://al.seblu.net/\$repo/\$arch
[xyne-x86_64]
Server = https://xyne.archlinux.ca/repos/xyne
"
for repo in $repos; do
arch=x86_64
repoconf=$(echo "$rollarch_additional_repo_names_possible" | sed -n -e "/^\[$repo\]/{N;p}")
if [[ -n $repoconf ]]; then
# echo "repo conf $repoconf" >&3
reposrv=${repoconf/\[$repo\]/}
reposrv=${reposrv//[[:space:]]/}
reposrv=$(eval echo "${reposrv/Server=/}")
echo "repo $reposrv" >&3
curl -Ls $reposrv | grep "pkg.tar" &> /dev/null
[ $? ]
else
echo "removed $repo" >&3
fi
done
}