• 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

Revision0f6b8b0cf1106ea7a45806e6e2c46a588847e9d9 (tree)
Time2005-03-21 22:55:20
Authorhenoheno <henoheno>
Commiterhenoheno

Log Message

Added check_versiontag() and chmod_pkg()

Change Summary

Incremental Difference

--- a/release.sh
+++ b/release.sh
@@ -1,5 +1,5 @@
11 #!/bin/sh
2-# $Id: release.sh,v 1.16 2005/03/21 11:43:49 henoheno Exp $
2+# $Id: release.sh,v 1.17 2005/03/21 13:55:20 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 # ==========================================================
@@ -36,6 +36,31 @@ trace(){
3636 _msg="$1" ; test $# -gt 0 && shift ; warn " $_msg : ` quote "$@" `"
3737 }
3838
39+check_versiontag(){
40+ case "$1" in
41+ [1-9].[0-9] | [1-9].[0-9] ) tag="r$1" ;;
42+ [1-9].[0-9]_rc[1-9] | [1-9].[0-9]_rc[1-9] ) tag="r$1" ;;
43+ [1-9].[0-9].[0-9] | [1-9].[0-9].[0-9][0-9] ) tag="r$1" ;;
44+ [1-9].[0-9].[0-9]_[a-z]* | [1-9].[0-9].[0-9][0-9]_[a-z]* ) tag="r$1" ;;
45+ [1-9].[0-9].[0-9]_[1-9] | [1-9].[0-9].[0-9][0-9]_[1-9] ) tag="r$1" ;;
46+ HEAD | r1_3_3_branch ) tag="$rel" ;;
47+ '' ) usage ; return 1 ;;
48+ * ) warn "Error: Invalid string: $1" ; usage ; return 1 ;;
49+ esac
50+ echo "$tag" | tr '.' '_'
51+}
52+
53+chmod_pkg(){
54+ ( cd "$1"
55+ # ALL: Read only
56+ find . -type d | while read line; do chmod 755 "$line"; done
57+ find . -type f | while read line; do chmod 644 "$line"; done
58+ # Add write permission for PukiWiki
59+ chmod 777 attach backup cache counter diff trackback wiki* 2>/dev/null
60+ chmod 666 wiki*/*.txt cache/*.dat cache/*.ref cache/*.rel 2>/dev/null
61+ )
62+}
63+
3964 # Default variables -----------------------------------------
4065
4166 mod=pukiwiki
@@ -105,17 +130,8 @@ fi > /dev/null
105130 # Argument check --------------------------------------------
106131
107132 rel="$1"
133+tag="` check_versiontag "$rel" `"
108134 pkg_dir="${mod}-${rel}"
109-case "$rel" in
110- [1-9].[0-9] | [1-9].[0-9] ) tag="r$rel" ;;
111- [1-9].[0-9]_rc[1-9] | [1-9].[0-9]_rc[1-9] ) tag="r$rel" ;;
112- [1-9].[0-9].[0-9] | [1-9].[0-9].[0-9][0-9] ) tag="r$rel" ;;
113- [1-9].[0-9].[0-9]_[a-z]* | [1-9].[0-9].[0-9][0-9]_[a-z]* ) tag="r$rel" ;;
114- [1-9].[0-9].[0-9]_[1-9] | [1-9].[0-9].[0-9][0-9]_[1-9] ) tag="r$rel" ;;
115- HEAD | r1_3_3_branch ) tag="$rel" ;;
116- * ) usage ; exit ;;
117-esac
118-tag="` echo "$tag" | tr '.' '_' `"
119135
120136 # Export the module -----------------------------------------
121137
@@ -134,20 +150,8 @@ echo find "$pkg_dir" -type f -name '.cvsignore' -delete
134150 find "$pkg_dir" -type f -name '.cvsignore' -delete
135151
136152 # chmod -----------------------------------------------------
137-( cd "$pkg_dir"
138153
139- # ALL: Read only
140- find . -type d | while read line; do
141- chmod 755 "$line"
142- done
143- find . -type f | while read line; do
144- chmod 644 "$line"
145- done
146-
147- # Add write permission for PukiWiki
148- chmod 777 attach backup cache counter diff trackback wiki*
149- chmod 666 wiki*/*.txt cache/*.dat cache/*.ref cache/*.rel
150-)
154+chmod_pkg "$pkg_dir"
151155
152156 # Create a package ------------------------------------------
153157