X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=upgrade%2F0.9.14%2Fwiki.utf8.sh;h=63c56af9d98b917c8c0f8be062f8ec613e524d7e;hb=65d7c6231130f7448f537449b9267285810510d4;hp=06a90d5b8401f40eb6dd9b29fa29b462c93117ca;hpb=3a824ce3e0ac4e8aeb002169197cd768504c7ec2;p=platal.git diff --git a/upgrade/0.9.14/wiki.utf8.sh b/upgrade/0.9.14/wiki.utf8.sh index 06a90d5..63c56af 100644 --- a/upgrade/0.9.14/wiki.utf8.sh +++ b/upgrade/0.9.14/wiki.utf8.sh @@ -1,11 +1,20 @@ #!/bin/sh WIKISPOOLDIR='../../spool/wiki.d/' +IMAGESPOOLDIR='../../spool/uploads/' find $WIKISPOOLDIR -name 'cache_*' -or -name 'tmp_*' -exec rm {} ";" for i in `find $WIKISPOOLDIR -type f`; do + CONV=`echo -n $i | iconv -t UTF-8` mv $i $i.latin1 - iconv -t UTF-8 $i.latin1 > $i + iconv -f latin1 -t UTF-8 $i.latin1 > $CONV +done + +for i in `find $IMAGESPOOLDIR -type f`; do + CONV=`echo -n $i | iconv -f latin1 -t UTF-8` + if [ $i != $CONV ]; then + mv $i $CONV + fi done echo "Les pages de wiki ont ete converites en UTF-8" @@ -13,3 +22,5 @@ echo "Verifie que tout c'est bien passe en presse ^D" cat find $WIKISPOOLDIR -name '*.latin1' -exec rm {} ";" +chown -R www-data:www-data $WIKISPOOLDIR +