diff options
author | EuAndreh <eu@euandre.org> | 2025-04-14 13:07:25 -0300 |
---|---|---|
committer | EuAndreh <eu@euandre.org> | 2025-04-14 13:07:25 -0300 |
commit | 01c4b654a37b1a8db0d822373670233dcfef4c43 (patch) | |
tree | e42a6c8ea40c0e429d6a569351a8a3a86e6b16fe | |
parent | src/{indexbody,feed}: Remove unused "shift" statements (diff) | |
download | mkwb-01c4b654a37b1a8db0d822373670233dcfef4c43.tar.gz mkwb-01c4b654a37b1a8db0d822373670233dcfef4c43.tar.xz |
src/categories: Guard against directories with "." in their names
-rwxr-xr-x | src/categories | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/categories b/src/categories index a054069..9261fdf 100755 --- a/src/categories +++ b/src/categories @@ -9,9 +9,10 @@ usage() { DIRECTORY="${1:-}" eval "$(assert-arg -- "$DIRECTORY" 'DIRECTORY')" -listall() { - find "$DIRECTORY"/category.*.*.sortdata | cut -d. -f2 | sort | uniq -} +listall() ( + cd "$DIRECTORY" + find category.*.*.sortdata | cut -d. -f2 | sort | uniq +) for category in `listall`; do out="$DIRECTORY"/categories."$category".sortdata |