diff --git a/drone-plugins/sanitize-links/san.sh b/drone-plugins/sanitize-links/san.sh index 1768c1c..b4cdec7 100755 --- a/drone-plugins/sanitize-links/san.sh +++ b/drone-plugins/sanitize-links/san.sh @@ -1,9 +1,10 @@ #! /bin/sh -echo "fuck" for noteDir in "$1/notes/*"; do - echo $noteDir + echo "noteDir: $noteDir" noteName=$(echo $noteDir| cut -d'/' -f3) - sed -i "#Resources/attachments#notes/$notename#" $noteDir/indx.md - echo $noteName + 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