From 212aec5d66e92d1eb8df576c9e7182fbc0e53677 Mon Sep 17 00:00:00 2001 From: ndwarshuis Date: Sat, 13 Mar 2021 17:05:36 -0500 Subject: [PATCH] FIX cleaning errors --- dot_bin/executable_bootstrap_pkgs | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/dot_bin/executable_bootstrap_pkgs b/dot_bin/executable_bootstrap_pkgs index 26a02e8..5e98d60 100644 --- a/dot_bin/executable_bootstrap_pkgs +++ b/dot_bin/executable_bootstrap_pkgs @@ -105,17 +105,17 @@ run_makepkg() { rm_makepkg_dir() { echo "Removing temporary makepkg build directory at $PKGBUILD_dir" - rm -r "$PKGBUILD_dir" + rm -r -f "$PKGBUILD_dir" } rm_yaytmp() { echo "Removing temporary build directory for yay at $YAYTMP" - rm -f "$YAYTMP" + rm -r -f "$YAYTMP" } rm_nobody_perms() { echo "Removing user nobody's permission to use pacman without password" - rm -r -f "$NOBODY_SUDO_CONF" + rm -f "$NOBODY_SUDO_CONF" } clean_up() { @@ -125,7 +125,7 @@ clean_up() { exit } -trap 'clean_up' ERR EXIT +trap 'clean_up' ERR if [[ ! "$(id -u)" = "0" ]]; then echo "This script must be run as root. Exiting" @@ -137,7 +137,10 @@ try_nobody_update mk_yaytmp run_yay +rm_yaytmp mk_makepkg_dir run_makepkg +rm_makepkg_dir +rm_nobody_perms