aboutsummaryrefslogtreecommitdiff
path: root/fix-dotfile-paths.sh
diff options
context:
space:
mode:
authorJacob Janzen <jacob.a.s.janzen@gmail.com>2024-10-01 18:16:37 -0500
committerJacob Janzen <jacob.a.s.janzen@gmail.com>2024-10-01 18:16:37 -0500
commit477148d207308f190ece92868343fbe13bf6d7a6 (patch)
treeeb32d88b3e2cfd5026fab89844c77e166d911219 /fix-dotfile-paths.sh
parented5d7dcb914a7352a60b715b48d9101022776212 (diff)
simplify logic
Diffstat (limited to 'fix-dotfile-paths.sh')
-rwxr-xr-xfix-dotfile-paths.sh2
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