From 62c583a5c151e8b9d6de6397d1726fb18e1858db Mon Sep 17 00:00:00 2001 From: Jacob Janzen <jjanzenn@proton.me> Date: Thu, 8 Aug 2024 19:53:46 -0500 Subject: more script modifications --- fix-dotfile-paths.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'fix-dotfile-paths.sh') diff --git a/fix-dotfile-paths.sh b/fix-dotfile-paths.sh index d2daece..122769b 100755 --- a/fix-dotfile-paths.sh +++ b/fix-dotfile-paths.sh @@ -3,8 +3,10 @@ create_ls_entry () { echo "#+title: =~/$1=" > index.org echo "* Directories" >> index.org - for dir in */; do - echo "- [[https://jjanzen.ca/dotfiles/$1/${dir}][${dir}]]" >> index.org + find -- . -maxdepth 1 -type d | sed 's/^\.\///' | while read -r file; do + if [ "${dir}" != "*" ]; then + echo "- [[https://jjanzen.ca/dotfiles/$1/${dir}][${dir}]]" >> index.org + fi done echo "* Files" >> index.org find -- . -maxdepth 1 -type f | sed 's/^\.\///' | while read -r file; do @@ -30,8 +32,6 @@ create_ls_entry () { cd ~/.dotfiles || exit START=$(pwd) -create_ls_entry "" - # iterate over all files except the .git/ directory and . find -- . -type d | sed '/^\.\$/d' | sed '/^\.\/\.git\//d' | sed '/^\.\/.git/d' | while read -r dir; do cd "${dir}" || continue -- cgit v1.2.3