Finally working

main
Nick Dumas 2 years ago
parent e8f419c261
commit 1d80a84dc8

@ -1,10 +1,5 @@
#! /bin/sh #! /bin/sh
for noteDir in "$1/notes/*"; do # Grab the "note name", e.g. `$BLOGDIR/contents/notes/demo-post/` yields 'demo-post'
echo "noteDir: $noteDir" noteName=$(echo $1|awk -F'/' '{print $(NF-1)}')
noteName=$(echo $noteDir| cut -d'/' -f3) sed -i "s#Resources/attachments#notes/$noteName#" $1
notePath="$(echo $noteDir| cut -d'/' -f1-2)/$noteName"
echo "noteName: $noteName"
echo "notePath: $notePath"
sed -i "s#Resources/attachments#notes/$noteName#" $notePath/index.md
done

Loading…
Cancel
Save