From 2234bbd198925727fa6b4ef20abdf9a11f91fb21 Mon Sep 17 00:00:00 2001 From: adam Date: Thu, 24 Oct 2024 17:47:43 -0400 Subject: [PATCH] don't trip over slashes in title --- crediting/credit.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/crediting/credit.sh b/crediting/credit.sh index 144468e..28cd0e3 100755 --- a/crediting/credit.sh +++ b/crediting/credit.sh @@ -10,7 +10,7 @@ while read p || [[ -n $p ]]; do echo "i: $i" FIELDS[1]=$( echo "${FIELDS[1]}" | cut -c 2- ) echo "field1: ${FIELDS[1]}" - FIELDS[2]=$( echo "${FIELDS[2]}" | cut -c 2- ) + FIELDS[2]=$( echo "${FIELDS[2]}" | cut -c 2- | sed 's/\//\\\//g') echo "field2: ${FIELDS[2]}" sed 's/\[num\]/['"$i"']/' "$SCRIPT_DIR/credit.html" > "$SCRIPT_DIR/credit2.html" echo "first sed, done" @@ -49,6 +49,7 @@ while read p || [[ -n $p ]]; do sed -i 's/\[platform img\]//' "$SCRIPT_DIR/credit2.html" else echo "who?!" + FIELDS[1]=$( echo "${FIELDS[1]}" ) sed -i 's/\[platform img\]//' "$SCRIPT_DIR/credit2.html" fi echo "setting author to ${FIELDS[1]}!"