admin/emails/broken: remove trailing spaces after email addresses
[platal.git] / upgrade / 0.9.14 / wiki.utf8.sh
1 #!/bin/sh
2
3 WIKISPOOLDIR='../../spool/wiki.d/'
4 IMAGESPOOLDIR='../../spool/uploads/'
5
6 find $WIKISPOOLDIR -name 'cache_*' -or -name 'tmp_*' -exec rm {} ";"
7 for i in `find $WIKISPOOLDIR -type f`; do
8 CONV=`echo -n $i | iconv -t UTF-8`
9 mv $i $i.latin1
10 iconv -f latin1 -t UTF-8 $i.latin1 > $CONV
11 done
12
13 for i in `find $IMAGESPOOLDIR -type f`; do
14 CONV=`echo -n $i | iconv -f latin1 -t UTF-8`
15 if [ $i != $CONV ]; then
16 mv $i $CONV
17 fi
18 done
19
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 {} ";"
25 chown -R www-data:www-data $WIKISPOOLDIR
26