aboutsummaryrefslogtreecommitdiff
path: root/fix-dotfile-paths.sh
diff options
context:
space:
mode:
authorJacob Janzen <jjanzenn@proton.me>2024-08-08 19:58:39 -0500
committerJacob Janzen <jjanzenn@proton.me>2024-08-08 19:58:39 -0500
commitdc19c7ae8dc2103a7c06cd2dfc473382ce79e224 (patch)
treeab077f620809f523346e8a30ef41b47f91425e32 /fix-dotfile-paths.sh
parent62c583a5c151e8b9d6de6397d1726fb18e1858db (diff)
debugging
Diffstat (limited to 'fix-dotfile-paths.sh')
-rwxr-xr-xfix-dotfile-paths.sh5
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