Convert image name to UTF8
authorx2003bruneau <x2003bruneau@839d8a87-29fc-0310-9880-83ba4fa771e5>
Tue, 27 Mar 2007 21:48:11 +0000 (21:48 +0000)
committerx2003bruneau <x2003bruneau@839d8a87-29fc-0310-9880-83ba4fa771e5>
Tue, 27 Mar 2007 21:48:11 +0000 (21:48 +0000)
git-svn-id: svn+ssh://murphy/home/svn/platal/trunk@1625 839d8a87-29fc-0310-9880-83ba4fa771e5

upgrade/0.9.14/wiki.utf8.sh

index e469bb3..2d0f4da 100644 (file)
@@ -1,6 +1,7 @@
 #!/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
@@ -9,6 +10,13 @@ for i in `find $WIKISPOOLDIR -type f`; do
     iconv -t UTF-8 $i.latin1 > $CONV
 done
 
+for i in `find $IMAGESPOOLDIR -type f`; do
+    CONV=`echo -n $i | iconv -t UTF-8`
+    if [ $i != $CONV ]; then
+        mv $i $CONV
+    fi
+done
+
 echo "Les pages de wiki ont ete converites en UTF-8"
 echo "Verifie que tout c'est bien passe en presse ^D"
 cat