diff --git a/crediting/credit.sh b/crediting/credit.sh index 28cd0e3..538ffba 100755 --- a/crediting/credit.sh +++ b/crediting/credit.sh @@ -19,37 +19,37 @@ while read p || [[ -n $p ]]; do if [[ "${FIELDS[1]}" =~ ^"[yt]/" ]] then echo "tubelike!" - FIELDS[1]=$( echo "${FIELDS[1]}" | cut -c 6- ) + FIELDS[1]=$( echo "${FIELDS[1]}" | cut -c 6- | sed 's/\//\\\//g') echo "${FIELDS[1]}" sed -i 's/\[platform img\]//' "$SCRIPT_DIR/credit2.html" elif [[ "${FIELDS[1]}" =~ ^"[vimeo]/" ]] then echo "vimeous!" - FIELDS[1]=$( echo "${FIELDS[1]}" | cut -c 9- ) + FIELDS[1]=$( echo "${FIELDS[1]}" | cut -c 9- | sed 's/\//\\\//g') sed -i 's/\[platform img\]//' "$SCRIPT_DIR/credit2.html" elif [[ "${FIELDS[1]}" =~ ^"[fandom]/" ]] then echo "fandom wiki!" - FIELDS[1]=$( echo "${FIELDS[1]}" | cut -c 10- ) + FIELDS[1]=$( echo "${FIELDS[1]}" | cut -c 10- | sed 's/\//\\\//g') sed -i 's/\[platform img\]//' "$SCRIPT_DIR/credit2.html" elif [[ "${FIELDS[1]}" =~ ^"[github]/" ]] then echo "github!" - FIELDS[1]=$( echo "${FIELDS[1]}" | cut -c 10- ) + FIELDS[1]=$( echo "${FIELDS[1]}" | cut -c 10- | sed 's/\//\\\//g') sed -i 's/\[platform img\]//' "$SCRIPT_DIR/credit2.html" elif [[ "${FIELDS[1]}" =~ ^"[mastodon]/" ]] then echo "mastodon!" - FIELDS[1]=$( echo "${FIELDS[1]}" | cut -c 12- ) + FIELDS[1]=$( echo "${FIELDS[1]}" | cut -c 12- | sed 's/\//\\\//g') sed -i 's/\[platform img\]//' "$SCRIPT_DIR/credit2.html" elif [[ "${FIELDS[1]}" =~ ^"[twitch]/" ]] then echo "twitch!" - FIELDS[1]=$( echo "${FIELDS[1]}" | cut -c 10- ) + FIELDS[1]=$( echo "${FIELDS[1]}" | cut -c 10- | sed 's/\//\\\//g') sed -i 's/\[platform img\]//' "$SCRIPT_DIR/credit2.html" else echo "who?!" - FIELDS[1]=$( echo "${FIELDS[1]}" ) + FIELDS[1]=$( echo "${FIELDS[1]}" | sed 's/\//\\\//g') sed -i 's/\[platform img\]//' "$SCRIPT_DIR/credit2.html" fi echo "setting author to ${FIELDS[1]}!"