OSDN Git Service

allow branch_r1_4_7 etc
[pukiwiki/pukiwiki_devel.git] / release.sh
index 6e07f1f..7118f82 100755 (executable)
@@ -1,11 +1,11 @@
 #!/bin/sh
-# $Id: release.sh,v 1.30 2009/03/22 15:41:14 henoheno Exp $
+# $Id: release.sh,v 1.34 2011/06/05 14:22:24 henoheno Exp $
 # $CVSKNIT_Id: release.sh,v 1.11 2004/05/28 14:26:24 henoheno Exp $
 #  Release automation script for PukiWiki
 #  ==========================================================
-   Copyright='(C) 2002-2004 minix-up project, All Rights Reserved'
+   Copyright='(C) 2002-2004,2011 minix-up project, All Rights Reserved'
    Homepage='http://cvsknit.sourceforge.net/'
-   License='BSD Licnese, NO WARRANTY'
+   License='(also revised)BSD Licnese, NO WARRANTY'
 #
 
 # Name and Usage --------------------------------------------
@@ -47,7 +47,7 @@ check_versiontag(){
     [1-9].[0-9].[0-9]_[a-z]* | [1-9].[0-9].[0-9][0-9]_[a-z]* ) tag="r$1" ;;
     [1-9].[0-9].[0-9]_[1-9]  | [1-9].[0-9].[0-9][0-9]_[1-9]  ) tag="r$1" ;;
     [1-9].[0-9].[0-9]_[1-9]_[a-z]*  | [1-9].[0-9].[0-9][0-9]_[1-9]_[a-z]*  ) tag="r$1" ;;
-    HEAD | r1_3_3_branch ) tag="$rel" ;;
+    HEAD | r1_3_3_branch | branch_r1* ) tag="$rel" ;;
     '' ) usage ; return 1 ;;
      * ) warn "Error: Invalid string: $1" ; usage ; return 1 ;;
   esac
@@ -141,8 +141,7 @@ if [ "$__utf8" ] ; then
   then err "encls not found"
   else
     php="` which php `"        || err "php-cli not found"
-    test -f /usr/local/bin/php || err "/usr/local/bin/php not found (but $php found)"
-    encls="`pwd`/$encls"
+    encls="$php `pwd`/$encls"
   fi
 
   convert(){
@@ -204,7 +203,10 @@ if [ "$__utf8" ] ; then
   echo "Converting EUC-JP => UTF-8 ..."
   find "$pkg_dir" -type f \( -name "*.txt" -or -name "*.php" -or -name "*.lng"  -or -name "*.dat" -or -name "*.ref" \) |
   while read line; do
-    convert "$line"
+    case "$line" in
+      "$pkg_dir"/zh-CN.lng.php ) ;; # UTF-8 already, Do nothing
+      * ) convert "$line" ;;
+    esac
   done
 
   # Replace 'EUC-JP' => 'UTF-8'