You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Botspot-Pi-Apps/apps/Box86/install-32

31 lines
1.1 KiB
Bash

#!/bin/bash
DIRECTORY="$(dirname "$(dirname "$( cd "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )")")"
function error {
echo -e "\\e[91m$1\\e[39m"
exit 1
}
echo -n "Checking for working systemd-binfmt..."
if ! sudo systemctl restart systemd-binfmt ;then
echo -e "\nError: systemd-binfmt failed to restart. Running debug..."
echo 'systemctl status systemd-binfmt.service'
systemctl status systemd-binfmt.service
echo 'systemctl status systemd-binfmt.service'
journalctl -xe | cat
error "Exiting now because systemd-binfmt failed to restart."
else
echo "Done"
fi
sudo rm -f /etc/apt/sources.list.d/box86.list
echo "adding box86 repo..."
sudo wget https://itai-nelken.github.io/weekly-box86-debs/debian/box86.list -O /etc/apt/sources.list.d/box86.list || error "Failed to download /etc/apt/sources.list.d/box86.list"
echo "adding key..."
wget -qO- https://itai-nelken.github.io/weekly-box86-debs/debian/KEY.gpg | sudo apt-key add - || error "Failed to add key to box86 repo!"
echo "installing box86..."
"${DIRECTORY}/pkg-install" "box86" "$(dirname "$0")" || exit 1