Revisión | 5836cfacdbf290f641725c379d368bc82c1487dc (tree) |
---|---|
Tiempo | 2004-12-31 00:50:52 |
Autor | pukiwikiadmin <pukiwikiadmin> |
Commiter | pukiwikiadmin |
This commit was manufactured by cvs2svn to create tag 'r1_4_5_alpha'.
@@ -1,3 +0,0 @@ | ||
1 | -#!/bin/sh | |
2 | - | |
3 | -grep -B1 "^function" ../*.php | sed -e "s/^\.\.\///" | sed "s/[a-z]*\.php\:function[ \t]*//" |
@@ -1,171 +0,0 @@ | ||
1 | -#!/bin/sh | |
2 | -# $Id: release.sh,v 1.9 2004-10-18 14:31:15 henoheno Exp $ | |
3 | -# $CVSKNIT_Id: release.sh,v 1.11 2004/05/28 14:26:24 henoheno Exp $ | |
4 | -# Release automation script for PukiWiki | |
5 | -# ========================================================== | |
6 | - Copyright='(C) 2002-2004 minix-up project, All Rights Reserved' | |
7 | - Homepage='http://cvsknit.sourceforge.net/' | |
8 | - License='BSD Licnese, NO WARRANTY' | |
9 | -# | |
10 | - | |
11 | -# Name and Usage -------------------------------------------- | |
12 | -_name="` basename $0 `" | |
13 | - | |
14 | -usage(){ | |
15 | - trace 'usage()' || return # (DEBUG) | |
16 | - warn "Usage: $_name VERSION_TAG (1.4.3_rc1 like)" | |
17 | - return 1 | |
18 | -} | |
19 | - | |
20 | -# Common functions ------------------------------------------ | |
21 | -warn(){ echo "$*" 1>&2 ; } | |
22 | -err() { warn "Error: $*" ; exit 1 ; } | |
23 | - | |
24 | -quote(){ | |
25 | - test $# -gt 0 && { echo -n "\"$1\"" ; shift ; } | |
26 | - while [ $# -gt 0 ] ; do echo -n " \"$1\"" ; shift ; done ; echo | |
27 | -} | |
28 | - | |
29 | -trace(){ | |
30 | - test "$__debug" || return 0 # (DEBUG) | |
31 | - _msg="$1" ; test $# -gt 0 && shift ; warn " $_msg : ` quote "$@" `" | |
32 | -} | |
33 | - | |
34 | -# Default variables ----------------------------------------- | |
35 | - | |
36 | -mod=pukiwiki | |
37 | - | |
38 | -CVSROOT=":pserver:anonymous@cvs.sourceforge.jp:/cvsroot/$mod" | |
39 | - | |
40 | -# Function verifying arguments ------------------------------ | |
41 | - | |
42 | -getopt(){ _arg=noarg | |
43 | - trace 'getopt()' "$@" # (DEBUG) | |
44 | - | |
45 | - case "$1" in | |
46 | - '' ) echo 1 ;; | |
47 | - -[hH]|--help ) echo _help _exit ;; | |
48 | - --debug ) echo _debug ;; | |
49 | - --zip ) echo _zip ;; | |
50 | - -d ) echo _CVSROOT 2 ; _arg="$2" ;; | |
51 | - -* ) warn "Error: Unknown option \"$1\"" ; return 1 ;; | |
52 | - * ) echo OTHER ;; | |
53 | - esac | |
54 | - | |
55 | - test 'x' != "x$_arg" | |
56 | -} | |
57 | - | |
58 | -# Working start --------------------------------------------- | |
59 | - | |
60 | -# Show arguments in one line (DEBUG) | |
61 | -case '--debug' in "$1"|"$3") false ;; * ) true ;; esac || { | |
62 | - test 'x--debug' = "x$1" && shift ; __debug=on ; trace 'Args ' "$@" | |
63 | -} | |
64 | - | |
65 | -# Parsing | |
66 | -while [ $# -gt 0 ] ; do | |
67 | - chs="` getopt "$@" `" || err "Syntax error with '$1'" | |
68 | - trace '$chs ' "$chs" # (DEBUG) | |
69 | - | |
70 | - for ch in $chs ; do | |
71 | - case "$ch" in | |
72 | - [1-3] ) shift $ch ;; | |
73 | - _exit ) exit ;; | |
74 | - _help ) usage ;; | |
75 | - | |
76 | - _CVSROOT) CVSROOT="$2" ;; | |
77 | - | |
78 | - _* ) shift ; eval "_$ch"=on ;; | |
79 | - * ) break 2 ;; | |
80 | - esac | |
81 | - done | |
82 | -done | |
83 | - | |
84 | -# No argument | |
85 | -if [ $# -eq 0 ] ; then usage ; exit ; fi | |
86 | - | |
87 | -# Archiver check -------------------------------------------- | |
88 | - | |
89 | -if [ -z "$__zip" ] | |
90 | -then | |
91 | - which tar || exit | |
92 | - which gzip || exit | |
93 | -else | |
94 | - which zip || exit | |
95 | -fi > /dev/null | |
96 | - | |
97 | -# Argument check -------------------------------------------- | |
98 | - | |
99 | -rel="$1" | |
100 | -pkg_dir="${mod}-${rel}" | |
101 | -case "$rel" in | |
102 | - [1-9].[0-9] | [1-9].[0-9] ) tag="r$rel" ;; | |
103 | - [1-9].[0-9]_rc[1-9] | [1-9].[0-9]_rc[1-9] ) tag="r$rel" ;; | |
104 | - [1-9].[0-9].[0-9] | [1-9].[0-9].[0-9][0-9] ) tag="r$rel" ;; | |
105 | - [1-9].[0-9].[0-9]_[a-z]* | [1-9].[0-9].[0-9][0-9]_[a-z]* ) tag="r$rel" ;; | |
106 | - * ) usage ; exit ;; | |
107 | -esac | |
108 | -tag="` echo "$tag" | tr '.' '_' `" | |
109 | - | |
110 | -# Export the module ----------------------------------------- | |
111 | - | |
112 | -test ! -d "$pkg_dir" || err "There's already a directory: $pkg_dir" | |
113 | - | |
114 | -echo cvs -z3 -d "$CVSROOT" -q export -r "$tag" -d "$pkg_dir" "$mod" | |
115 | - cvs -z3 -d "$CVSROOT" -q export -r "$tag" -d "$pkg_dir" "$mod" | |
116 | - | |
117 | -test -d "$pkg_dir" || err "There is'nt a directory: $pkg_dir" | |
118 | - | |
119 | -# Remove '.cvsignore' if exists ----------------------------- | |
120 | -echo find "$pkg_dir" -type f -name '.cvsignore' -delete | |
121 | - find "$pkg_dir" -type f -name '.cvsignore' -delete | |
122 | - | |
123 | -# chmod ----------------------------------------------------- | |
124 | -( cd "$pkg_dir" | |
125 | - | |
126 | - # ALL: Read only | |
127 | - find . -type d | while read line; do | |
128 | - chmod 755 "$line" | |
129 | - done | |
130 | - find . -type f | while read line; do | |
131 | - chmod 644 "$line" | |
132 | - done | |
133 | - | |
134 | - # Add write permission for PukiWiki | |
135 | - chmod 777 attach backup cache counter diff trackback wiki* | |
136 | - chmod 666 wiki*/*.txt cache/*.dat | |
137 | -) | |
138 | - | |
139 | -# Compress -------------------------------------------------- | |
140 | -( cd "$pkg_dir" | |
141 | - | |
142 | - # wiki.en/ | |
143 | - target="wiki.en" | |
144 | - if [ -z "$__zip" ] | |
145 | - then tar cf - "$target" | gzip -9 > "$target".tgz | |
146 | - else zip -r9 "$target.zip" "$target" | |
147 | - fi | |
148 | - rm -Rf "$target" | |
149 | - | |
150 | - # en documents | |
151 | - if [ -z "$__zip" ] | |
152 | - then gzip -9 *.en.txt | |
153 | - else | |
154 | - for list in *.en.txt ; do | |
155 | - zip -9 "$list".zip "$list" | |
156 | - rm -f "$list" | |
157 | - done | |
158 | - fi | |
159 | -) | |
160 | - | |
161 | -if [ -z "$__zip" ] | |
162 | -then | |
163 | - # Tar | |
164 | - echo tar cf - "$pkg_dir" \| gzip -9 \> "$pkg_dir.tar.gz" | |
165 | - tar cf - "$pkg_dir" | gzip -9 > "$pkg_dir.tar.gz" | |
166 | -else | |
167 | - # Zip | |
168 | - echo zip -r9 "$pkg_dir.zip" "$pkg_dir" | |
169 | - zip -r9 "$pkg_dir.zip" "$pkg_dir" | |
170 | -fi | |
171 | - |
@@ -1,120 +0,0 @@ | ||
1 | -#!/bin/sh | |
2 | -# $Id: release_update.sh,v 1.5 2004-09-11 15:13:47 henoheno Exp $ | |
3 | -# $CVSKNIT_Id: release.sh,v 1.11 2004/05/28 14:26:24 henoheno Exp $ | |
4 | -# Release automation script for PukiWiki | |
5 | -# ========================================================== | |
6 | - Copyright='(C) 2002-2004 minix-up project, All Rights Reserved' | |
7 | - Homepage='http://cvsknit.sourceforge.net/' | |
8 | - License='BSD Licnese, NO WARRANTY' | |
9 | -# | |
10 | - | |
11 | -# Functions ----------------------------------------------- | |
12 | -warn(){ echo "$*" 1>&2 ; } | |
13 | -err() { warn "Error: $*" ; exit 1 ; } | |
14 | - | |
15 | -usage(){ | |
16 | - warn "USAGE: `basename $0` VERSION_FROM VERSION_TO (VERSION = '1.4.3_rc1' like)" | |
17 | - return 1 | |
18 | -} | |
19 | - | |
20 | -check_versiontag(){ | |
21 | - case "$1" in | |
22 | - [1-9].[0-9] | [1-9].[0-9] ) tag="r$1" ;; | |
23 | - [1-9].[0-9]_rc[1-9] | [1-9].[0-9]_rc[1-9] ) tag="r$1" ;; | |
24 | - [1-9].[0-9].[0-9] | [1-9].[0-9].[0-9][0-9] ) tag="r$1" ;; | |
25 | - [1-9].[0-9].[0-9]_rc[1-9] | [1-9].[0-9].[0-9][0-9]_rc[1-9] ) tag="r$1" ;; | |
26 | - '' ) usage ; return 1 ;; | |
27 | - * ) warn "Error: Invalid string: $1" ; usage ; return 1 ;; | |
28 | - esac | |
29 | - echo "$tag" | tr '.' '_' | |
30 | -} | |
31 | - | |
32 | -# ------------------------------------------- | |
33 | -# Argument check | |
34 | - | |
35 | -rel_from="$1" | |
36 | -rel_to="$2" | |
37 | - | |
38 | -tag_from="` check_versiontag "$rel_from" `" || exit | |
39 | -tag_to="` check_versiontag "$rel_to" `" || exit | |
40 | - | |
41 | -if [ "x$rel_from" = "x$rel_to" ] ; then | |
42 | - warn "Error: VERSION_FROM and VERSION_TO is equivalent" | |
43 | - usage ; exit | |
44 | -fi | |
45 | - | |
46 | -# ------------------------------------------- | |
47 | -# Default | |
48 | - | |
49 | -mod=pukiwiki | |
50 | -CVSROOT=":pserver:anonymous@cvs.sourceforge.jp:/cvsroot/$mod" | |
51 | - | |
52 | -pkg_dir="$mod" | |
53 | - | |
54 | -# ------------------------------------------- | |
55 | - | |
56 | -# Checkout the module with VERSION_FROM | |
57 | -test ! -d "$pkg_dir" || err "There's already a directory: $pkg_dir" | |
58 | -echo cvs -z3 -d "$CVSROOT" co -r "$tag_from" -d "$pkg_dir" "$mod" | |
59 | - cvs -z3 -d "$CVSROOT" co -r "$tag_from" -d "$pkg_dir" "$mod" | |
60 | -test -d "$pkg_dir" || err "There isn't a directory: $pkg_dir" | |
61 | - | |
62 | -# Merge VERSION_FROM to VERSION_TO | |
63 | -( cd "$pkg_dir" | |
64 | - echo cvs up -dP -j "$tag_from" -j "$tag_to" | |
65 | - cvs up -dP -j "$tag_from" -j "$tag_to" | |
66 | - | |
67 | - # Cleanup backup files by cvs | |
68 | - find . -type f -name ".#*" | xargs rm -f | |
69 | -) | |
70 | - | |
71 | -# Remove files those are not Added or Modified | |
72 | -( cd "$pkg_dir" | |
73 | - | |
74 | - find . -type f | grep -v /CVS/ | while read line ; do | |
75 | - result="` cvs -nq up "$line" 2>/dev/null | grep '^[AM] ' | cut -b 3- `" | |
76 | - test "x$result" != "x" || rm -f "$line" | |
77 | - echo -n "." | |
78 | - done | |
79 | - echo | |
80 | -) | |
81 | - | |
82 | -# Remove CVS directories | |
83 | - find "$pkg_dir" -type d -name "CVS" | xargs rm -Rf | |
84 | - | |
85 | -# Remove '.cvsignore' if exists | |
86 | -echo find "$pkg_dir" -type f -name '.cvsignore' -delete | |
87 | - find "$pkg_dir" -type f -name '.cvsignore' -delete | |
88 | - | |
89 | -# Remove emptied directories | |
90 | -find "$pkg_dir" -type d -empty | xargs rmdir | |
91 | -find "$pkg_dir" -type d -empty | xargs rmdir | |
92 | - | |
93 | -# chmod | |
94 | -( cd "$pkg_dir" | |
95 | - | |
96 | - # ALL: Read only | |
97 | - find . -type d | while read line; do | |
98 | - chmod 755 "$line" | |
99 | - done | |
100 | - find . -type f | while read line; do | |
101 | - chmod 644 "$line" | |
102 | - done | |
103 | - | |
104 | - # Add write permission for PukiWiki | |
105 | - chmod 777 attach backup cache counter diff trackback wiki* 2>/dev/null | |
106 | - chmod 666 wiki*/*.txt cache/*.dat 2>/dev/null | |
107 | - | |
108 | -) | |
109 | - | |
110 | -# Tar | |
111 | -echo tar cf - "$pkg_dir" \| gzip -9 \> "update_$rel_to.tar.gz" | |
112 | - tar cf - "$pkg_dir" | gzip -9 > "update_$rel_to.tar.gz" | |
113 | - | |
114 | -# Zip | |
115 | -#echo zip -r9 "update_$rel_to.zip" "$pkg_dir" | |
116 | -# zip -r9 "update_$rel_to.zip" "$pkg_dir" | |
117 | - | |
118 | -#echo rm -Rf "$pkg_dir" | |
119 | -# rm -Rf "$pkg_dir" | |
120 | - |