tori/check
2024-06-26 11:12:37 -03:00

36 lines
567 B
Bash
Executable file

#! /usr/bin/env sh
# user-configured settings
TORI_ROOT="$HOME/.config/tori"
# global state
files=
# application logic
log() {
local level="$1" # unimplemented
local message="$2"
if [ -n "$DEBUG" ] && [ $level = debug ]; then
printf "$(date "+%H:%M:%N") $message\n"
fi
}
traverse() {
local target="$1"
log debug "traversing $target"
if [ -d "$target" ]; then
log debug "found dir: $target"
files="$(find "$target" -type f)\n$files"
fi
log debug "collected files:\n$files"
}
cd "$TORI_ROOT"
for item in $TORI_ROOT/*; do
traverse "$item"
done