aboutsummaryrefslogtreecommitdiff
path: root/sh/profile.d
diff options
context:
space:
mode:
Diffstat (limited to 'sh/profile.d')
-rw-r--r--sh/profile.d/downloads.sh13
1 files changed, 13 insertions, 0 deletions
diff --git a/sh/profile.d/downloads.sh b/sh/profile.d/downloads.sh
new file mode 100644
index 00000000..eb2a9b54
--- /dev/null
+++ b/sh/profile.d/downloads.sh
@@ -0,0 +1,13 @@
+[ -f "$HOME"/.downloads ] || return
+(
+ while IFS= read -r dir ; do
+ case $dir in
+ '#'*) continue ;;
+ esac
+ [ -d "$dir" ] || continue
+ set -- "$dir"/*
+ [ -e "$1" ] || shift
+ [ "$#" -gt 0 ] || continue
+ printf 'You have %u unsorted files in %s.\n' "$#" "$dir"
+ done < "$HOME"/.downloads
+)