Revision | 020e23982f44e58f2a292060da8b0bcae9ff9688 (tree) |
---|---|
Time | 2005-03-19 12:03:04 |
Author | pukiwikiadmin <pukiwikiadmin> |
Commiter | pukiwikiadmin |
This commit was manufactured by cvs2svn to create tag
'pukiwiki_2005-03-19_autoalias'.
@@ -1,3 +0,0 @@ | ||
1 | -#!/bin/sh | |
2 | - | |
3 | -grep -B1 "^function" ../*.php | sed -e "s/^\.\.\///" | sed "s/[a-z]*\.php\:function[ \t]*//" |
@@ -1,180 +0,0 @@ | ||
1 | -#!/bin/sh | |
2 | -# $Id: release.sh,v 1.15 2005-02-20 14:51:52 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 [options] VERSION_TAG (1.4.3_rc1 like)" | |
17 | - warn " Options:" | |
18 | - warn " --nopkg Suppress creating archive (Extract and chmod only)" | |
19 | - warn " -z|--zip Create *.zip archive" | |
20 | - return 1 | |
21 | -} | |
22 | - | |
23 | -# Common functions ------------------------------------------ | |
24 | -warn(){ echo "$*" 1>&2 ; } | |
25 | -err() { warn "Error: $*" ; exit 1 ; } | |
26 | - | |
27 | -quote(){ | |
28 | - test $# -gt 0 && { echo -n "\"$1\"" ; shift ; } | |
29 | - while [ $# -gt 0 ] ; do echo -n " \"$1\"" ; shift ; done ; echo | |
30 | -} | |
31 | - | |
32 | -trace(){ | |
33 | - test "$__debug" || return 0 # (DEBUG) | |
34 | - _msg="$1" ; test $# -gt 0 && shift ; warn " $_msg : ` quote "$@" `" | |
35 | -} | |
36 | - | |
37 | -# Default variables ----------------------------------------- | |
38 | - | |
39 | -mod=pukiwiki | |
40 | - | |
41 | -CVSROOT=":pserver:anonymous@cvs.sourceforge.jp:/cvsroot/$mod" | |
42 | - | |
43 | -# Function verifying arguments ------------------------------ | |
44 | - | |
45 | -getopt(){ _arg=noarg | |
46 | - trace 'getopt()' "$@" # (DEBUG) | |
47 | - | |
48 | - case "$1" in | |
49 | - '' ) echo 1 ;; | |
50 | - -[hH]|--help ) echo _help _exit ;; | |
51 | - --debug ) echo _debug ;; | |
52 | - --nopkg ) echo _nopkg ;; | |
53 | - -z|--zip ) echo _zip ;; | |
54 | - -d ) echo _CVSROOT 2 ; _arg="$2" ;; | |
55 | - -* ) warn "Error: Unknown option \"$1\"" ; return 1 ;; | |
56 | - * ) echo OTHER ;; | |
57 | - esac | |
58 | - | |
59 | - test 'x' != "x$_arg" | |
60 | -} | |
61 | - | |
62 | -# Working start --------------------------------------------- | |
63 | - | |
64 | -# Show arguments in one line (DEBUG) | |
65 | -case '--debug' in "$1"|"$3") false ;; * ) true ;; esac || { | |
66 | - test 'x--debug' = "x$1" && shift ; __debug=on ; trace 'Args ' "$@" | |
67 | -} | |
68 | - | |
69 | -# Parsing | |
70 | -while [ $# -gt 0 ] ; do | |
71 | - chs="` getopt "$@" `" || err "Syntax error with '$1'" | |
72 | - trace '$chs ' "$chs" # (DEBUG) | |
73 | - | |
74 | - for ch in $chs ; do | |
75 | - case "$ch" in | |
76 | - [1-3] ) shift $ch ;; | |
77 | - _exit ) exit ;; | |
78 | - _help ) usage ;; | |
79 | - | |
80 | - _CVSROOT) CVSROOT="$2" ;; | |
81 | - | |
82 | - _* ) shift ; eval "_$ch"=on ;; | |
83 | - * ) break 2 ;; | |
84 | - esac | |
85 | - done | |
86 | -done | |
87 | - | |
88 | -# No argument | |
89 | -if [ $# -eq 0 ] ; then usage ; exit ; fi | |
90 | - | |
91 | -# Archiver check -------------------------------------------- | |
92 | - | |
93 | -if [ -z "$__zip" ] | |
94 | -then | |
95 | - which tar || err "tar not found" | |
96 | - which gzip || err "gzip not found" | |
97 | -else | |
98 | - which zip || err "zip not found" | |
99 | -fi > /dev/null | |
100 | - | |
101 | -# Argument check -------------------------------------------- | |
102 | - | |
103 | -rel="$1" | |
104 | -pkg_dir="${mod}-${rel}" | |
105 | -case "$rel" in | |
106 | - [1-9].[0-9] | [1-9].[0-9] ) tag="r$rel" ;; | |
107 | - [1-9].[0-9]_rc[1-9] | [1-9].[0-9]_rc[1-9] ) tag="r$rel" ;; | |
108 | - [1-9].[0-9].[0-9] | [1-9].[0-9].[0-9][0-9] ) tag="r$rel" ;; | |
109 | - [1-9].[0-9].[0-9]_[a-z]* | [1-9].[0-9].[0-9][0-9]_[a-z]* ) tag="r$rel" ;; | |
110 | - [1-9].[0-9].[0-9]_[1-9] | [1-9].[0-9].[0-9][0-9]_[1-9] ) tag="r$rel" ;; | |
111 | - HEAD | r1_3_3_branch ) tag="$rel" ;; | |
112 | - * ) usage ; exit ;; | |
113 | -esac | |
114 | -tag="` echo "$tag" | tr '.' '_' `" | |
115 | - | |
116 | -# Export the module ----------------------------------------- | |
117 | - | |
118 | -test ! -d "$pkg_dir" || err "There's already a directory: $pkg_dir" | |
119 | - | |
120 | -echo cvs -z3 -d "$CVSROOT" -q export -r "$tag" -d "$pkg_dir" "$mod" | |
121 | - cvs -z3 -d "$CVSROOT" -q export -r "$tag" -d "$pkg_dir" "$mod" | |
122 | - | |
123 | -test -d "$pkg_dir" || err "There is'nt a directory: $pkg_dir" | |
124 | - | |
125 | -# Remove '.cvsignore' if exists ----------------------------- | |
126 | -echo find "$pkg_dir" -type f -name '.cvsignore' -delete | |
127 | - find "$pkg_dir" -type f -name '.cvsignore' -delete | |
128 | - | |
129 | -# chmod ----------------------------------------------------- | |
130 | -( cd "$pkg_dir" | |
131 | - | |
132 | - # ALL: Read only | |
133 | - find . -type d | while read line; do | |
134 | - chmod 755 "$line" | |
135 | - done | |
136 | - find . -type f | while read line; do | |
137 | - chmod 644 "$line" | |
138 | - done | |
139 | - | |
140 | - # Add write permission for PukiWiki | |
141 | - chmod 777 attach backup cache counter diff trackback wiki* | |
142 | - chmod 666 wiki*/*.txt cache/*.dat cache/*.ref cache/*.rel | |
143 | -) | |
144 | - | |
145 | -# Create a package ------------------------------------------ | |
146 | - | |
147 | -test ! -z "$__nopkg" && exit 0 | |
148 | - | |
149 | -( cd "$pkg_dir" | |
150 | - | |
151 | - # wiki.en/ | |
152 | - target="wiki.en" | |
153 | - if [ -z "$__zip" ] | |
154 | - then tar cf - "$target" | gzip -9 > "$target".tgz | |
155 | - else zip -r9 "$target.zip" "$target" | |
156 | - fi | |
157 | - rm -Rf "$target" | |
158 | - | |
159 | - # en documents | |
160 | - if [ -z "$__zip" ] | |
161 | - then gzip -9 *.en.txt | |
162 | - else | |
163 | - for list in *.en.txt ; do | |
164 | - zip -9 "$list".zip "$list" | |
165 | - rm -f "$list" | |
166 | - done | |
167 | - fi | |
168 | -) | |
169 | - | |
170 | -if [ -z "$__zip" ] | |
171 | -then | |
172 | - # Tar + gzip | |
173 | - echo tar cf - "$pkg_dir" \| gzip -9 \> "$pkg_dir.tar.gz" | |
174 | - tar cf - "$pkg_dir" | gzip -9 > "$pkg_dir.tar.gz" | |
175 | -else | |
176 | - # Zip | |
177 | - echo zip -r9 "$pkg_dir.zip" "$pkg_dir" | |
178 | - zip -r9 "$pkg_dir.zip" "$pkg_dir" | |
179 | -fi | |
180 | - |
@@ -1,121 +0,0 @@ | ||
1 | -#!/bin/sh | |
2 | -# $Id: release_update.sh,v 1.6 2005-02-20 14:51:26 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 | - [1-9].[0-9].[0-9]_[1-9] | [1-9].[0-9].[0-9][0-9]_[1-9] ) tag="r$1" ;; | |
27 | - '' ) usage ; return 1 ;; | |
28 | - * ) warn "Error: Invalid string: $1" ; usage ; return 1 ;; | |
29 | - esac | |
30 | - echo "$tag" | tr '.' '_' | |
31 | -} | |
32 | - | |
33 | -# ------------------------------------------- | |
34 | -# Argument check | |
35 | - | |
36 | -rel_from="$1" | |
37 | -rel_to="$2" | |
38 | - | |
39 | -tag_from="` check_versiontag "$rel_from" `" || exit | |
40 | -tag_to="` check_versiontag "$rel_to" `" || exit | |
41 | - | |
42 | -if [ "x$rel_from" = "x$rel_to" ] ; then | |
43 | - warn "Error: VERSION_FROM and VERSION_TO is equivalent" | |
44 | - usage ; exit | |
45 | -fi | |
46 | - | |
47 | -# ------------------------------------------- | |
48 | -# Default | |
49 | - | |
50 | -mod=pukiwiki | |
51 | -CVSROOT=":pserver:anonymous@cvs.sourceforge.jp:/cvsroot/$mod" | |
52 | - | |
53 | -pkg_dir="$mod" | |
54 | - | |
55 | -# ------------------------------------------- | |
56 | - | |
57 | -# Checkout the module with VERSION_FROM | |
58 | -test ! -d "$pkg_dir" || err "There's already a directory: $pkg_dir" | |
59 | -echo cvs -z3 -d "$CVSROOT" co -r "$tag_from" -d "$pkg_dir" "$mod" | |
60 | - cvs -z3 -d "$CVSROOT" co -r "$tag_from" -d "$pkg_dir" "$mod" | |
61 | -test -d "$pkg_dir" || err "There isn't a directory: $pkg_dir" | |
62 | - | |
63 | -# Merge VERSION_FROM to VERSION_TO | |
64 | -( cd "$pkg_dir" | |
65 | - echo cvs up -dP -j "$tag_from" -j "$tag_to" | |
66 | - cvs up -dP -j "$tag_from" -j "$tag_to" | |
67 | - | |
68 | - # Cleanup backup files by cvs | |
69 | - find . -type f -name ".#*" | xargs rm -f | |
70 | -) | |
71 | - | |
72 | -# Remove files those are not Added or Modified | |
73 | -( cd "$pkg_dir" | |
74 | - | |
75 | - find . -type f | grep -v /CVS/ | while read line ; do | |
76 | - result="` cvs -nq up "$line" 2>/dev/null | grep '^[AM] ' | cut -b 3- `" | |
77 | - test "x$result" != "x" || rm -f "$line" | |
78 | - echo -n "." | |
79 | - done | |
80 | - echo | |
81 | -) | |
82 | - | |
83 | -# Remove CVS directories | |
84 | - find "$pkg_dir" -type d -name "CVS" | xargs rm -Rf | |
85 | - | |
86 | -# Remove '.cvsignore' if exists | |
87 | -echo find "$pkg_dir" -type f -name '.cvsignore' -delete | |
88 | - find "$pkg_dir" -type f -name '.cvsignore' -delete | |
89 | - | |
90 | -# Remove emptied directories | |
91 | -find "$pkg_dir" -type d -empty | xargs rmdir | |
92 | -find "$pkg_dir" -type d -empty | xargs rmdir | |
93 | - | |
94 | -# chmod | |
95 | -( cd "$pkg_dir" | |
96 | - | |
97 | - # ALL: Read only | |
98 | - find . -type d | while read line; do | |
99 | - chmod 755 "$line" | |
100 | - done | |
101 | - find . -type f | while read line; do | |
102 | - chmod 644 "$line" | |
103 | - done | |
104 | - | |
105 | - # Add write permission for PukiWiki | |
106 | - chmod 777 attach backup cache counter diff trackback wiki* 2>/dev/null | |
107 | - chmod 666 wiki*/*.txt cache/*.dat 2>/dev/null | |
108 | - | |
109 | -) | |
110 | - | |
111 | -# Tar | |
112 | -echo tar cf - "$pkg_dir" \| gzip -9 \> "update_$rel_to.tar.gz" | |
113 | - tar cf - "$pkg_dir" | gzip -9 > "update_$rel_to.tar.gz" | |
114 | - | |
115 | -# Zip | |
116 | -#echo zip -r9 "update_$rel_to.zip" "$pkg_dir" | |
117 | -# zip -r9 "update_$rel_to.zip" "$pkg_dir" | |
118 | - | |
119 | -#echo rm -Rf "$pkg_dir" | |
120 | -# rm -Rf "$pkg_dir" | |
121 | - |
@@ -1,86 +0,0 @@ | ||
1 | -#!/bin/sh | |
2 | -# $Id: tdiary-demogen.sh,v 1.7 2005-01-25 12:47:11 henoheno Exp $ | |
3 | -# | |
4 | -# tDiary demonstration generator: generates many [theme].php | |
5 | -# License: GPL | |
6 | - | |
7 | -warn(){ echo "$*" 1>&2; } | |
8 | -err(){ warn "$*"; exit 1; } | |
9 | - | |
10 | -usage(){ | |
11 | - base="`basename $0`"; | |
12 | - warn " $base [-d path/to/theme-directory] list" | |
13 | - warn " $base [-d path/to/theme-directory] interwiki" | |
14 | - warn " $base [-d path/to/theme-directory] touch" | |
15 | - warn " $base [-d path/to/theme-directory] untouch" | |
16 | - warn " Command:" | |
17 | - warn " lis|list - List themes" | |
18 | - warn " int|interwiki - Publish interwiki definition and setting for each theme" | |
19 | - warn " tou|touch - Generate \$theme.php that includes index.php" | |
20 | - warn " unt|untouch - Remove \$theme.php(s) listed in theme directory" | |
21 | - exit 1 | |
22 | -} | |
23 | - | |
24 | -theme_list(){ | |
25 | - cd "$dir" || err "Error: directory '$dir' not found" | |
26 | - ls -1 | while read theme; do | |
27 | - test -f "$theme/$theme.css" && echo "$theme" | |
28 | - done | |
29 | -} | |
30 | - | |
31 | -# ---- Argument check ---- | |
32 | -dir="skin/theme" | |
33 | -if [ "x-d" = "x$1" ] ; then | |
34 | - dir="$2" | |
35 | - shift 2 | |
36 | -fi | |
37 | -cmd="$1" | |
38 | - | |
39 | -# ---- | |
40 | - | |
41 | -case "$cmd" in | |
42 | -''|-h|hel|help ) usage ;; | |
43 | -lis|list ) theme_list ;; | |
44 | - | |
45 | -int|inte|inter|interw|interwi|interwik|interwiki) | |
46 | - echo '--------' | |
47 | - echo '- [./$1.php theme] raw tDiary theme selector' | |
48 | - echo '--------' | |
49 | - echo '- (s) = sidebar CSS exists in this theme' | |
50 | - theme_list | while read theme; do | |
51 | - echo -n "+ [[theme:$theme]]" | |
52 | - grep -q div.sidebar "$dir/$theme/$theme.css" && echo -n " (s)" | |
53 | - echo | |
54 | - done | |
55 | - ;; | |
56 | - | |
57 | -tou|touc|touch ) | |
58 | - theme_list | while read theme; do | |
59 | - if [ -f "$theme.php" ] | |
60 | - then echo "Warning: '$theme.php' is already available. Ignoreing..." | |
61 | - else | |
62 | - cat <<EOF > "$theme.php" | |
63 | -<?php | |
64 | - define('TDIARY_THEME', '$theme'); | |
65 | - require('./index.php') | |
66 | -?> | |
67 | -EOF | |
68 | - fi | |
69 | - done | |
70 | - ;; | |
71 | - | |
72 | -unt|unto|untou|untouc|untouch ) | |
73 | - echo -n " Remove theme(s).php ? [y/N]: " | |
74 | - read answer | |
75 | - case "$answer" in | |
76 | - [yY] | [yY][eE][sS] ) | |
77 | - theme_list | while read theme ; do | |
78 | - test -f "$theme.php" && grep -q "define('TDIARY_THEME', '$theme');" "$theme.php" && rm -f "$theme.php" | |
79 | - done | |
80 | - ;; | |
81 | - * ) | |
82 | - echo " Stopped." | |
83 | - esac | |
84 | - ;; | |
85 | -esac | |
86 | - |