From 6b4344a39f62ec2f453ffb1e791f56d44e6cc32a Mon Sep 17 00:00:00 2001 From: Rudra Saraswat Date: Tue, 1 Feb 2022 01:04:46 +0530 Subject: [PATCH] 0.8.0 - fix minor issues --- una | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/una b/una index 7833de3..5d0f8b4 100755 --- a/una +++ b/una @@ -83,13 +83,17 @@ _install() { info "cloning ${pkgname}" LC_ALL=C git clone "https://mpr.makedeb.org/${pkgname}.git" 2>&1 | grep -q 'empty repository' && \ - ( sudo apt-get install -y "${pkgname}" && ( rmdir "${HOME}/.cache/una/pkgs/${pkgname}" &>/dev/null || true ) \ - || fatal "this package doesn't exist or an error occured" ) || true + ( sudo apt-get install -y "${pkgname}" && ( ( rmdir "${HOME}/.cache/una/pkgs/${pkgname}" &>/dev/null; \ + touch "/tmp/${pkgname}.lock" ) || true ) || fatal "this package doesn't exist or an error occured" ) || true if [ "$2" != "force" ]; then - LC_ALL=C dpkg-query -W -f='${Status}' "${pkgname}" 2>/dev/null | grep -q "ok installed" && return || true + LC_ALL=C dpkg-query -W -f='${Status}' "${pkgname}" 2>/dev/null | grep -q "ok installed" && return || true; + elif [ "$2" == "force" ] && [[ -f "/tmp/${pkgname}.lock" ]]; then + rm -f "/tmp/${pkgname}.lock"; return; fi + rm -f "/tmp/${pkgname}.lock" + source "${pkgname}/PKGBUILD" new_optdepends=()