From 93769bedcf77214a1d9477cb6b891ff49fecaacc Mon Sep 17 00:00:00 2001 From: Itai Nelken <70802936+Itai-Nelken@users.noreply.github.com> Date: Mon, 26 Apr 2021 20:20:46 +0300 Subject: [PATCH] Fix Box86 uninstall script not having the DIRECTORY variable --- apps/Box86/uninstall | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/apps/Box86/uninstall b/apps/Box86/uninstall index 2b3d10d..428a558 100755 --- a/apps/Box86/uninstall +++ b/apps/Box86/uninstall @@ -1,5 +1,7 @@ #!/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 @@ -26,11 +28,10 @@ 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." + sudo dpkg --remove-architecture armhf || warning "armhf architecture should be removed by now, but it isn't!" 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'." + 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 @@ -41,4 +42,4 @@ else fi echo "running 'sudo apt update'..." -sudo apt update \ No newline at end of file +sudo apt update