diff options
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 |