File tree Expand file tree Collapse file tree 2 files changed +20
-0
lines changed Expand file tree Collapse file tree 2 files changed +20
-0
lines changed Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ for FILE in $( find . -type f -name ' *.mdx' )
4+ do
5+ if [ -f " $FILE " ]; then
6+ echo " Traitement du fichier : $FILE "
7+
8+ # Remplacer les URLs avec `sed`
9+ sed -i.bak -E ' /https:\/\/www\.scaleway\.com\/en\/docs\/.*tutorial.*/!s#(https://www\.scaleway\.com/en/docs/)[^/]+(/.*)#\1\2#g' " $FILE "
10+
11+ # Optionnel : Supprimer les fichiers de sauvegarde .bak
12+ rm " $FILE .bak"
13+ else
14+ echo " Aucun fichier .mdx trouvé dans le dossier."
15+ fi
16+
17+ done
18+
19+
Original file line number Diff line number Diff line change 3131 "scripts" : {
3232 "prepare" : " husky install" ,
3333 "check-slugs" : " bin/list-invalid-slugs" ,
34+ "clean-categories" : " bin/clean-categories" ,
3435 "format" : " yarn run prettier --config .prettierrc --write \" **/*.json\" "
3536 }
3637}
You can’t perform that action at this time.
0 commit comments