From 477148d207308f190ece92868343fbe13bf6d7a6 Mon Sep 17 00:00:00 2001 From: Jacob Janzen Date: Tue, 1 Oct 2024 18:16:37 -0500 Subject: simplify logic --- fix-dotfile-paths.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fix-dotfile-paths.sh b/fix-dotfile-paths.sh index ce62627..450d1c2 100755 --- a/fix-dotfile-paths.sh +++ b/fix-dotfile-paths.sh @@ -19,7 +19,7 @@ create_ls_entry () { if [ "$file" = ".wallpaper" ]; then echo "- [[https://wallhaven.cc/w/vgryy5][=.wallpaper=]]" >> index.org elif echo "$file" | grep -q "\.org$" && [ "$file" != "index.org" ]; then - new_file=$(basename "$(grep '#+begin_src' "$file" | head -1 | cut -d ' ' -f 4)") + new_file=$(echo "$file" | sed 's/\.org$//') html=$(echo "$file" | sed 's/\.org$/\.html/') echo "- [[$2$1$html][=$new_file=]]" >> index.org fi -- cgit v1.2.3