3a824ce3 |
1 | #!/bin/sh |
2 | |
3 | WIKISPOOLDIR='../../spool/wiki.d/' |
73cf81b8 |
4 | IMAGESPOOLDIR='../../spool/uploads/' |
3a824ce3 |
5 | |
6 | find $WIKISPOOLDIR -name 'cache_*' -or -name 'tmp_*' -exec rm {} ";" |
7 | for i in `find $WIKISPOOLDIR -type f`; do |
caf4ad02 |
8 | CONV=`echo -n $i | iconv -t UTF-8` |
3a824ce3 |
9 | mv $i $i.latin1 |
cfcd4f3c |
10 | iconv -f latin1 -t UTF-8 $i.latin1 > $CONV |
3a824ce3 |
11 | done |
12 | |
73cf81b8 |
13 | for i in `find $IMAGESPOOLDIR -type f`; do |
85d49538 |
14 | CONV=`echo -n $i | iconv -f latin1 -t UTF-8` |
73cf81b8 |
15 | if [ $i != $CONV ]; then |
16 | mv $i $CONV |
17 | fi |
18 | done |
19 | |
3a824ce3 |
20 | echo "Les pages de wiki ont ete converites en UTF-8" |
21 | echo "Verifie que tout c'est bien passe en presse ^D" |
22 | cat |
23 | |
24 | find $WIKISPOOLDIR -name '*.latin1' -exec rm {} ";" |
2256e1b4 |
25 | chown -R www-data:www-data $WIKISPOOLDIR |
26 | |