Box86: fully use pkg-install, for catching apt errors

pull/899/head
Botspot 3 years ago
parent edf94ac144
commit a0f755251f

@ -11,9 +11,9 @@ function error {
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"
"${DIRECTORY}/pkg-install" "box86" "$(dirname "$0")" || exit 1

@ -15,22 +15,16 @@ function check-armhf() {
ARMHF="$(dpkg --print-foreign-architectures | grep "armhf")"
}
if command -v box86 >/dev/null;then
echo "uninstalling box86..."
sudo apt purge box86 -y || error "Failed to uninstall box86!"
fi
"${DIRECTORY}/purge-installed" "$(dirname "$0")" || exit 1
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
if [ ! -z "$(file "$(readlink -f "/sbin/init")" | grep 64)" ]; then
"${DIRECTORY}/purge-installed" "$(dirname "$0")" || exit 1
sudo dpkg --remove-architecture armhf || warning "armhf architecture should be removed by now, but it isn't!"
check-armhf
if [[ "$ARMHF" == *"armhf"* ]]; then

Loading…
Cancel
Save