X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=upgrade%2F0.9.14%2Fwiki.utf8.sh;h=63c56af9d98b917c8c0f8be062f8ec613e524d7e;hb=0536df807608570acf3f738ba3082de31cfa0b16;hp=4e62d0f6e52862fad8dc6c165a6f5cb10031827f;hpb=caf4ad0265eccfca949bc83fbd09fba8fc28f15e;p=platal.git diff --git a/upgrade/0.9.14/wiki.utf8.sh b/upgrade/0.9.14/wiki.utf8.sh index 4e62d0f..63c56af 100644 --- a/upgrade/0.9.14/wiki.utf8.sh +++ b/upgrade/0.9.14/wiki.utf8.sh @@ -1,12 +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 > $CONV + 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" @@ -14,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 +