From c21583bfbb06b70468982c8399bf6969fd415efd Mon Sep 17 00:00:00 2001 From: Nick Dumas Date: Thu, 23 Feb 2023 14:52:27 -0500 Subject: [PATCH] trying again --- drone-plugins/sanitize-links/san.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drone-plugins/sanitize-links/san.sh b/drone-plugins/sanitize-links/san.sh index acdc09a..1768c1c 100755 --- a/drone-plugins/sanitize-links/san.sh +++ b/drone-plugins/sanitize-links/san.sh @@ -1,9 +1,9 @@ #! /bin/sh -notes=$(find $1 -type f -name "*.md") -for n in $notes; do - echo "Sanitizing: $n" - fn=$(cut -d'.' -f1 $n) - echo $fn - sed -i "#Resources/attachments#notes/$fn#g" $n +echo "fuck" +for noteDir in "$1/notes/*"; do + echo $noteDir + noteName=$(echo $noteDir| cut -d'/' -f3) + sed -i "#Resources/attachments#notes/$notename#" $noteDir/indx.md + echo $noteName done