• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Commit MetaInfo

Revisiónf469e8b28b9298bae1d11d30d50a16dd5eea2e51 (tree)
Tiempo2006-05-15 00:35:37
Autorhenoheno <henoheno>
Commiterhenoheno

Log Message

Salvaged

Cambiar Resumen

Diferencia incremental

--- a/release.sh
+++ b/release.sh
@@ -1,5 +1,5 @@
11 #!/bin/sh
2-# $Id: release.sh,v 1.25 2005/09/25 10:13:23 henoheno Exp $
2+# $Id: release.sh,v 1.26 2006/05/14 15:35:37 henoheno Exp $
33 # $CVSKNIT_Id: release.sh,v 1.11 2004/05/28 14:26:24 henoheno Exp $
44 # Release automation script for PukiWiki
55 # ==========================================================
@@ -132,6 +132,11 @@ if [ "$__utf8" ] ; then
132132 if [ "$nkf_version" = '1' -o "$nkf_version" = '0' ] ; then
133133 err "nkf found but not seems 2.x (UTF-8 enabled) or later"
134134 fi
135+ encls="./encls.php"
136+ if [ ! -f "$encls" ]
137+ then err "encls not found"
138+ else encls="`pwd`/$encls"
139+ fi
135140 convert(){
136141 for list in "$@" ; do
137142 # NOTE: Specify '-E'(From EUC-JP) otherwise skin file will be collapsed
@@ -188,7 +193,7 @@ test -z "$__noremove" && {
188193
189194 if [ "$__utf8" ] ; then
190195 echo "Converting EUC-JP => UTF-8 ..."
191- find "$pkg_dir" -type f \( -name "*.txt" -or -name "*.php" -or -name "*.lng" -or -name "*.dat" \) |
196+ find "$pkg_dir" -type f \( -name "*.txt" -or -name "*.php" -or -name "*.lng" -or -name "*.dat" -or -name "*.ref" \) |
192197 while read line; do
193198 convert "$line"
194199 done
@@ -198,7 +203,21 @@ if [ "$__utf8" ] ; then
198203 convert_EUCJP2UTF8 lib/init.php skin/pukiwiki.skin*.php
199204 )
200205
201- # Filename about wiki/*.txt or something are not coverted yet
206+ # Filename encoded 'encoded-EUC-JP' to 'encoded-UTF-8'
207+ echo "Renaming encoded-EUC-JP => encoded-UTF-8 ..."
208+ ( cd "$pkg_dir" &&
209+ for dir in wiki wiki.en cache; do
210+ ( cd "$dir" &&
211+ ls *.txt *.ref 2>/dev/null | while read line; do
212+ target="`$encls "$line" 2>/dev/null`"
213+ if [ "x$line" != "x$target" ] ; then
214+ echo " " mv "$line" "$target"
215+ mv "$line" "$target" || exit
216+ fi
217+ done
218+ )
219+ done
220+ ) || err "stop."
202221 fi
203222
204223 # chmod -----------------------------------------------------