From eb8db3561568a5527522c2e564e7c34eadb6ecd3 Mon Sep 17 00:00:00 2001 From: BodgeMaster <> Date: Sun, 24 Mar 2024 13:28:25 +0100 Subject: [PATCH] scripts/lib: Fix a bug in the `remove` function --- scripts/lib.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/lib.sh b/scripts/lib.sh index 7ce3a3a..e2aaa99 100755 --- a/scripts/lib.sh +++ b/scripts/lib.sh @@ -59,16 +59,16 @@ fi function remove { local USE_FORCE="" if [ "$1" = "-f" ]; then - USE_FORCE="-f" + USE_FORCE="f" + shift echo "Forcefully removing $1..." else echo "Removing $1..." fi; - shift if [ -d "$1" ]; then - rm "$USE_FORCE" -rv "$1" + rm -"$USE_FORCE"rv "$1" else - rm "$USE_FORCE" -v "$1" + rm -"$USE_FORCE"v "$1" fi }