aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xfix-dotfile-paths.sh9
1 files changed, 4 insertions, 5 deletions
diff --git a/fix-dotfile-paths.sh b/fix-dotfile-paths.sh
index 301c019..a31c7a4 100755
--- a/fix-dotfile-paths.sh
+++ b/fix-dotfile-paths.sh
@@ -1,15 +1,15 @@
#!/bin/sh
create_ls_entry () {
- echo "creating entry $2$1"
+ echo "creating entry $(pwd)$1"
echo "#+title: =~/$1=" > index.org
echo "* Directories" >> index.org
if [ "$1" != "" ]; then
- echo "- [[$2$1..][=../=]]" >> index.org
+ echo "- [[../][=../=]]" >> index.org
fi
find -L -- . -maxdepth 1 -type d | sed '/^\.$/d' | sed 's/^\.\///' | sort | while read -r dir; do
if [ "$dir" != "*" ] && [ "$dir" != ".git" ]; then
- echo "- [[$2$1$dir][=$dir/=]]" >> index.org
+ echo "- [[./$dir][=$dir/=]]" >> index.org
fi
done
files=$(find -L -- . -maxdepth 1 -type f | sed 's/^\.\///')
@@ -33,8 +33,7 @@ create_ls_entry () {
create_dir_tree () {
ROOT="$HOME/dotfiles/$1"
- URLROOT="../"
- create_ls_entry "" "$URLROOT"
+ create_ls_entry ""
# iterate over all directories
find -L -- . -type d | sed '/^\.$/d' | while read -r dir; do