From 6d1542576adeaf522f9788e2182cedffde2f758b Mon Sep 17 00:00:00 2001 From: Nick Dumas Date: Tue, 28 Feb 2023 10:03:45 -0500 Subject: [PATCH] this should work --- drone-plugins/sanitize-links/san.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) 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