debugging

This commit is contained in:
Jacob Janzen 2024-08-08 19:58:39 -05:00
parent 62c583a5c1
commit dc19c7ae8d

View file

@ -3,7 +3,7 @@
create_ls_entry () { create_ls_entry () {
echo "#+title: =~/$1=" > index.org echo "#+title: =~/$1=" > index.org
echo "* Directories" >> 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 if [ "${dir}" != "*" ]; then
echo "- [[https://jjanzen.ca/dotfiles/$1/${dir}][${dir}]]" >> index.org echo "- [[https://jjanzen.ca/dotfiles/$1/${dir}][${dir}]]" >> index.org
fi fi
@ -20,8 +20,7 @@ create_ls_entry () {
if echo "${file}" | grep -q "\.org\$"; then if echo "${file}" | grep -q "\.org\$"; then
new_file=$(basename "$(grep '#+begin_src' "${file}" | head -1 | cut -d ' ' -f 4)") new_file=$(basename "$(grep '#+begin_src' "${file}" | head -1 | cut -d ' ' -f 4)")
fi else
if [ "$new_file" = "" ]; then
new_file=$file new_file=$file
fi fi
echo "- [[https://jjanzen.ca/dotfiles/$1/${file}][${new_file}]]" >> index.org echo "- [[https://jjanzen.ca/dotfiles/$1/${file}][${new_file}]]" >> index.org