-
Notifications
You must be signed in to change notification settings - Fork 0
/
changeRepo_xbps.sh
executable file
·65 lines (45 loc) · 1.42 KB
/
changeRepo_xbps.sh
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
54
55
56
57
58
59
60
61
62
63
#!/bin/bash
opcao=$1
sudo mkdir -p /etc/xbps.d
sudo cp /usr/share/xbps.d/*-repository-*.conf /etc/xbps.d/
EUFinland(){
sudo xbps-install -S && sudo xbps-query -L
}
USAChicago(){
sudo sed -i 's|https://alpha.de.repo.voidlinux.org|https://mirrors.servercentral.com/voidlinux|g' /etc/xbps.d/*-repository-*.conf
sudo xbps-install -S && sudo xbps-query -L
}
USAKansasCity(){
sudo sed -i 's|https://alpha.de.repo.voidlinux.org|https://alpha.us.repo.voidlinux.org|g' /etc/xbps.d/*-repository-*.conf
sudo xbps-install -S && sudo xbps-query -L
}
USANewYork(){
sudo sed -i 's|https://alpha.de.repo.voidlinux.org|https://mirror.clarkson.edu/voidlinux|g' /etc/xbps.d/*-repository-*.conf
sudo xbps-install -S && sudo xbps-query -L
}
help(){
echo "Script para mudar mirror do Void Linux.
Uso: ./changeRepo_xbps.sh [opções]
Opções:
-h, --help Esta ajuda.
-euf EU: Finland.
-usc USA: Chicago.
-usk USA: Kansas City.
-usn USA: New York."
}
repositorio(){
case $opcao in
-euf ) EUFinland ;;
-usc ) USAChicago ;;
-usk ) USAKansasCity ;;
-usn ) USANewYork ;;
-h | --help ) help ;;
*) echo "Opção inválida! Use uma das seguintes opções:
-euf EU: Finland.
-usc USA: Chicago.
-usk USA: Kansas City.
-usn USA: New York."
exit 1 ;;
esac
}
repositorio