diff options
author | Jacob Janzen <jjanzenn@proton.me> | 2024-08-08 19:53:46 -0500 |
---|---|---|
committer | Jacob Janzen <jjanzenn@proton.me> | 2024-08-08 19:53:46 -0500 |
commit | 62c583a5c151e8b9d6de6397d1726fb18e1858db (patch) | |
tree | 015d0aaa59a9095eb41d98f6a9656bddcdb50073 /fix-dotfile-paths.sh | |
parent | 6e22da1c857b9c6c29f92970372e8ce715d01195 (diff) |
more script modifications
Diffstat (limited to 'fix-dotfile-paths.sh')
-rwxr-xr-x | fix-dotfile-paths.sh | 8 |
1 files changed, 4 insertions, 4 deletions
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 |