aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xfix-dotfile-paths.sh8
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