From dd77b8691543d8208c75751fb3edf378f2d3d73b Mon Sep 17 00:00:00 2001 From: Jacob Janzen Date: Sat, 10 Aug 2024 12:22:34 -0500 Subject: simpler and more correct file detection --- fix-dotfile-paths.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fix-dotfile-paths.sh b/fix-dotfile-paths.sh index 8894a7e..e4d22e0 100755 --- a/fix-dotfile-paths.sh +++ b/fix-dotfile-paths.sh @@ -13,7 +13,7 @@ create_ls_entry () { fi done files=$(find -L -- . -maxdepth 1 -type f | sed 's/^\.\///') - if [ "$(echo "$files" | wc -l | sed 's/[ \t]*//g')" != 0 ]; then + if [ "$files" != '' ]; then echo '* Files' >> index.org echo "$files" | sort | while read -r file; do if [ "$file" = ".wallpaper" ]; then -- cgit v1.2.3