From b20e2154dc5ace0822ffd1a31b129917a53489f8 Mon Sep 17 00:00:00 2001 From: 0x1eef <0x1eef@protonmail.com> Date: Sat, 14 Sep 2024 04:24:49 -0300 Subject: [PATCH] Log when `sourcezap rm` completes successfully --- libexec/sourcezap/commands/sourcezap-rm | 15 +++++++++------ share/sourcezap/CHANGELOG | 4 ++++ 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/libexec/sourcezap/commands/sourcezap-rm b/libexec/sourcezap/commands/sourcezap-rm index 26ce9b7..406f2b4 100755 --- a/libexec/sourcezap/commands/sourcezap-rm +++ b/libexec/sourcezap/commands/sourcezap-rm @@ -20,12 +20,12 @@ erase() dir="${1}" printf "%s " "${dir}" find "${dir}" \ - -maxdepth 1 \ - \! -name "." \ - \! -name ".." \ - \! -name "src" \ - -exec printf . \; \ - -exec rm -rf "{}" \; + -maxdepth 1 \ + \! -name "." \ + \! -name ".." \ + \! -name "src" \ + -exec printf . \; \ + -exec rm -rf "{}" \; echo } @@ -45,11 +45,14 @@ while true; do read -r r if [ "${r}" = "1" ]; then erase "${repodir}" + printok "remove complete" elif [ "${r}" = "2" ]; then erase "${installdir}" + printok "remove complete" elif [ "${r}" = "3" ]; then erase "${repodir}" erase "${installdir}" + printok "remove complete" elif [ "${r}" = "4" ]; then break else diff --git a/share/sourcezap/CHANGELOG b/share/sourcezap/CHANGELOG index cfb6a8d..11840d8 100644 --- a/share/sourcezap/CHANGELOG +++ b/share/sourcezap/CHANGELOG @@ -2,6 +2,10 @@ * vNEXT +**** Log when ~sourcezap rm~ completes successfully +Similar to other commands, log when the ~sourcezap rm~ command +completes successfully + **** Format log messages with program name This change formats log messages written to standard output and standard error with the pattern ~sourcezap: ~