diff options
Diffstat (limited to 'fix-dotfile-paths.sh')
-rwxr-xr-x | fix-dotfile-paths.sh | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/fix-dotfile-paths.sh b/fix-dotfile-paths.sh index 122769b..c6d6827 100755 --- a/fix-dotfile-paths.sh +++ b/fix-dotfile-paths.sh @@ -3,7 +3,7 @@ create_ls_entry () { echo "#+title: =~/$1=" > index.org echo "* Directories" >> index.org - find -- . -maxdepth 1 -type d | sed 's/^\.\///' | while read -r file; do + find -- . -maxdepth 1 -type d | sed 's/^\.\///' | while read -r dir; do if [ "${dir}" != "*" ]; then echo "- [[https://jjanzen.ca/dotfiles/$1/${dir}][${dir}]]" >> index.org fi @@ -20,8 +20,7 @@ create_ls_entry () { if echo "${file}" | grep -q "\.org\$"; then new_file=$(basename "$(grep '#+begin_src' "${file}" | head -1 | cut -d ' ' -f 4)") - fi - if [ "$new_file" = "" ]; then + else new_file=$file fi echo "- [[https://jjanzen.ca/dotfiles/$1/${file}][${new_file}]]" >> index.org |