Log when sourcezap rm completes successfully
Some checks are pending
sourcezap / shellcheck (push) Waiting to run

This commit is contained in:
0x1eef 2024-09-14 04:24:49 -03:00
parent ea359cc543
commit b20e2154dc
2 changed files with 13 additions and 6 deletions

View file

@ -20,12 +20,12 @@ erase()
dir="${1}" dir="${1}"
printf "%s " "${dir}" printf "%s " "${dir}"
find "${dir}" \ find "${dir}" \
-maxdepth 1 \ -maxdepth 1 \
\! -name "." \ \! -name "." \
\! -name ".." \ \! -name ".." \
\! -name "src" \ \! -name "src" \
-exec printf . \; \ -exec printf . \; \
-exec rm -rf "{}" \; -exec rm -rf "{}" \;
echo echo
} }
@ -45,11 +45,14 @@ while true; do
read -r r read -r r
if [ "${r}" = "1" ]; then if [ "${r}" = "1" ]; then
erase "${repodir}" erase "${repodir}"
printok "remove complete"
elif [ "${r}" = "2" ]; then elif [ "${r}" = "2" ]; then
erase "${installdir}" erase "${installdir}"
printok "remove complete"
elif [ "${r}" = "3" ]; then elif [ "${r}" = "3" ]; then
erase "${repodir}" erase "${repodir}"
erase "${installdir}" erase "${installdir}"
printok "remove complete"
elif [ "${r}" = "4" ]; then elif [ "${r}" = "4" ]; then
break break
else else

View file

@ -2,6 +2,10 @@
* vNEXT * 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 **** Format log messages with program name
This change formats log messages written to standard output This change formats log messages written to standard output
and standard error with the pattern ~sourcezap: <message>~ and standard error with the pattern ~sourcezap: <message>~