2020-03-29 21:18:30 +02:00
|
|
|
for FILE in $(ls *.md);
|
2020-03-29 22:18:12 +02:00
|
|
|
do
|
|
|
|
grep -q "Unfortunately, this page only exists" $FILE && continue
|
|
|
|
|
2020-03-29 21:18:30 +02:00
|
|
|
# Replace markdown links with full url ... we only need the relative url
|
|
|
|
sed -i -E 's@\(https://yunohost.org/#/(\w+)\)@(/\1)@g' $FILE
|
|
|
|
|
|
|
|
# Replace (/foo_fr) to (foo)
|
2020-09-05 19:49:02 +02:00
|
|
|
sed -i -E 's@\(\/?((\w|-)+)_(en|fr|es|it|ar|de|oc|ca)\)@(/\1)@g' $FILE
|
2020-03-29 21:18:30 +02:00
|
|
|
|
|
|
|
# Replace href="/foo_fr" to href="foo"
|
2020-09-05 19:49:02 +02:00
|
|
|
sed -i -E 's@href="/?((\w|-)+)_(en|fr|es|it|ar|de|oc|ca)"@href="/\1"@g' $FILE;
|
2020-03-29 21:18:30 +02:00
|
|
|
done
|
|
|
|
|
|
|
|
git checkout project_organization.md project_organization_fr.md
|