diff options
author | Jacob Janzen <jjanzenn@proton.me> | 2024-08-08 20:15:56 -0500 |
---|---|---|
committer | Jacob Janzen <jjanzenn@proton.me> | 2024-08-08 20:15:56 -0500 |
commit | 116945654481a03fcb946e1835f457466b8822dc (patch) | |
tree | afb580bd7831747b89e9e34e58fe2851d05ba257 /fix-dotfile-paths.sh | |
parent | 3ef22923485e754e525a7af6ed7d0f7c036085d8 (diff) |
fix paths
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 255e1b1..dd8085b 100755 --- a/fix-dotfile-paths.sh +++ b/fix-dotfile-paths.sh @@ -3,9 +3,9 @@ create_ls_entry () { echo "#+title: =~/$1=" > index.org echo "* Directories" >> index.org - find -- . -maxdepth 1 -type d | sed 's/^\.\///' | while read -r dir; do + find -- . -maxdepth 1 -type d | sed '/^\.$/d' | sed 's/^\.\///' | while read -r dir; do if [ "${dir}" != "*" ]; then - echo "- [[https://jjanzen.ca/dotfiles/$1/${dir}][${dir}]]" >> index.org + echo "- [[https://jjanzen.ca/dotfiles/$1${dir}][${dir}]]" >> index.org fi done echo "* Files" >> index.org @@ -24,7 +24,7 @@ create_ls_entry () { new_file=$file fi html=$(echo "${file}" | sed 's/\.org\$/\.html/') - echo "- [[https://jjanzen.ca/dotfiles/$1/${html}][${new_file}]]" >> index.org + echo "- [[https://jjanzen.ca/dotfiles/$1${html}][${new_file}]]" >> index.org fi done } @@ -40,7 +40,7 @@ find -- . -type d | sed '/^\.$/d' | sed '/^\.\/\.git\//d' | sed '/^\.\/.git/d' | dir=$(echo "${dir}" | sed 's/^\.\///') - create_ls_entry "${dir}" + create_ls_entry "${dir}/" cd "${START}" || exit done |