echo "adding instantOS repo"
-if ! uname -m | grep -q '^i'; then
- # default is 64 bit repo
- if ! grep -q 'instantos\.surge\.sh' /etc/pacman.conf; then
+addrepo() {
+ if ! grep -q "$1"'\.surge\.sh' /etc/pacman.conf; then
+ echo "adding $1 repo"
echo "[instant]" >>/etc/pacman.conf
echo "SigLevel = Optional TrustAll" >>/etc/pacman.conf
- echo "Server = http://instantos.surge.sh" >>/etc/pacman.conf
+ echo "Server = http://$1.surge.sh" >>/etc/pacman.conf
else
- echo "instantOS repository already added"
+ echo "instantOS $1 repository already added"
fi
+
+}
+
+if uname -m | grep -q '^x'; then
+ # default is 64 bit repo
+ addrepo instantos
+elif uname -m | grep 'arm'; then
+ addrepo instantosarm
+elif uname -m | grep '^i'; then
+ addrepo instantos32
else
- # 32 bit has a seperate repo (obviously)
- if ! grep -q 'instantos\.surge\.sh' /etc/pacman.conf; then
- echo "[instant]" >>/etc/pacman.conf
- echo "SigLevel = Optional TrustAll" >>/etc/pacman.conf
- echo "Server = http://instantos32.surge.sh" >>/etc/pacman.conf
- fi
+ echo "no suitable repo for architecture found"
fi