mirror of
https://github.com/notwa/rc
synced 2024-11-05 05:39:02 -08:00
10 lines
270 B
Bash
Executable file
10 lines
270 B
Bash
Executable file
#!/usr/bin/env bash
|
|
is_empty() {
|
|
while read -r; do
|
|
[ ! -d "$REPLY" ] && [ -s "$REPLY" ] && return 1
|
|
done < <(find ${1:-.})
|
|
# TODO: done < <(find ${1:-.} -type f -print -quit)
|
|
# this needs to skip empty files as well.
|
|
return 0
|
|
}
|
|
is_empty "$@"
|