diff options
author | Jacob Janzen <jacob.a.s.janzen@gmail.com> | 2024-10-01 18:16:37 -0500 |
---|---|---|
committer | Jacob Janzen <jacob.a.s.janzen@gmail.com> | 2024-10-01 18:16:37 -0500 |
commit | 477148d207308f190ece92868343fbe13bf6d7a6 (patch) | |
tree | eb32d88b3e2cfd5026fab89844c77e166d911219 | |
parent | ed5d7dcb914a7352a60b715b48d9101022776212 (diff) |
simplify logic
-rwxr-xr-x | fix-dotfile-paths.sh | 2 |
1 files changed, 1 insertions, 1 deletions
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 |