aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkaotisk <kaotisk@arching-kaos.org>2024-07-08 23:30:15 +0300
committerkaotisk <kaotisk@arching-kaos.org>2024-07-08 23:30:15 +0300
commit2234a7e87eeae4ffde7405df8601153452e61108 (patch)
tree282ab883029f41fb5531f6f1d764994357dac08d
parent6181c3479de2e4d13bfc9650363d037d69043fad (diff)
downloadarching-kaos-tools-2234a7e87eeae4ffde7405df8601153452e61108.tar.gz
arching-kaos-tools-2234a7e87eeae4ffde7405df8601153452e61108.tar.bz2
arching-kaos-tools-2234a7e87eeae4ffde7405df8601153452e61108.zip
Clean up now logs what happened
-rwxr-xr-xbin/ak-clean7
1 files changed, 7 insertions, 0 deletions
diff --git a/bin/ak-clean b/bin/ak-clean
index f69071c..2411190 100755
--- a/bin/ak-clean
+++ b/bin/ak-clean
@@ -21,6 +21,13 @@ descriptionString="Cleans ak temp files"
source $AK_LIBDIR/_ak_script
_ak_tmp_cleanup(){
+ ls -1 /tmp/aktmp* > /dev/null 2>&1
+ if [ $? -ne 0 ]
+ then
+ _ak_log_info "No tmp items found for deletion"
+ exit 0
+ fi
+ _ak_log_info "Cleaning up $(ls -1 /tmp/aktmp* | wc -l) items"
rm -rf /tmp/aktmp*
}