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

This commit is contained in:
0x1eef 2024-09-14 03:39:52 -03:00
parent fcae142b66
commit 76d9e0a3bb
2 changed files with 21 additions and 14 deletions

View file

@ -18,12 +18,12 @@ erase()
dir="${1}"
printf "%s " "${dir}"
find "${dir}" \
-maxdepth 1 \
\! -name "." \
\! -name ".." \
\! -name "ports" \
-exec printf . \; \
-exec rm -rf "{}" \;
-maxdepth 1 \
\! -name "." \
\! -name ".." \
\! -name "ports" \
-exec printf . \; \
-exec rm -rf "{}" \;
echo
}
@ -42,18 +42,21 @@ printf "1-4: "
while true; do
read -r r
if [ "${r}" = "1" ]; then
erase "${repodir}"
erase "${repodir}"
printok "remove complete"
elif [ "${r}" = "2" ]; then
erase "${installdir}"
erase "${installdir}"
printok "remove complete"
elif [ "${r}" = "3" ]; then
erase "${repodir}"
erase "${installdir}"
erase "${repodir}"
erase "${installdir}"
printok "remove complete"
elif [ "${r}" = "4" ]; then
break
break
else
printf "%s is not a valid option\n" "${r}"
printf "1-4: "
continue
printf "%s is not a valid option\n" "${r}"
printf "1-4: "
continue
fi
exit
done

View file

@ -2,6 +2,10 @@
* vNEXT
**** Log when ~portzap rm~ completes successfully
Similar to other commands, log when the ~portzap 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 ~portzap: <message>~