Box86 update to itai deb version

pull/454/head
Botspot 4 years ago
parent f11b05f5bc
commit 05a1839707

@ -0,0 +1 @@
Itai-Nelken for his box86 debs and script creation

@ -7,4 +7,13 @@ function error {
exit 1
}
wget -qO- https://raw.githubusercontent.com/Botspot/box86-updater/main/update-box86 | bash || error "update-box86 script failed somehow!"
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 "running 'sudo apt update'..."
sudo apt update || error "Failed to run sudo apt update"
echo "installing box86..."
sudo apt install box86 -y || error "Failed to install the box86 package"

@ -1,18 +1,44 @@
#!/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 "Uninstalling box86 from system."
cd ~/box86/build
sudo make uninstall
cd $HOME
function warning {
echo -e "\e[33m$1\\e[39m"
}
function check-armhf() {
ARMHF="$(dpkg --print-foreign-architectures | grep "armhf")"
}
echo "uninstalling box86..."
sudo apt purge box86 -y || error "Failed to uninstall box86!"
echo "removing box86 repo..."
sudo rm -f /etc/apt/sources.list.d/box86.list || error "Failed to remove repo!"
echo "removing box86 repo key..."
sudo apt-key remove "5DBC E818 72C0 609D 3C47 61AA EB3C E9A3 37EC DFA4" || error "Failed to remove key!"
echo "running 'sudo apt update'..."
sudo apt update
echo "moving box86 folder to trash."
gio trash ~/box86
if [ ! -z "$(file "$(readlink -f "/sbin/init")" | grep 64)" ]; then
"${DIRECTORY}/purge-installed" "$(dirname "$0")" || exit 1
sudo dpkg --remove-architecture armhf || warning "Failed to remove armhf architecture.\nMost likely, you already had other armhf packages installed prior to this."
check-armhf
if [[ "$ARMHF" == *"armhf"* ]]; then
warning "armhf architecture should be removed by now, but it isn't!"
warning "You probably have some other programs using it, remove it by running 'sudo dpkg --remove-architecture armhf'."
fi
elif [ ! -z "$(file "$(readlink -f "/sbin/init")" | grep 32)" ]; then
#32-bit
true #do nothing
else
error "Can't detect OS architecture! something is very wrong!"
fi
exit 0
echo "running 'sudo apt update'..."
sudo apt update
Loading…
Cancel
Save