2 # $Id: release.sh,v 1.4 2004/09/01 12:46:58 henoheno Exp $
3 # $CVSKNIT_Id: release.sh,v 1.11 2004/05/28 14:26:24 henoheno Exp $
4 # Release automation script
5 # ==========================================================
6 Copyright='(C) 2002-2004 minix-up project, All Rights Reserved'
7 Homepage='http://cvsknit.sourceforge.net/'
8 License='BSD Licnese, NO WARRANTY'
11 # Functions -----------------------------------------------
12 warn(){ echo "$*" 1>&2 ; }
13 err() { warn "Error: $*" ; exit 1 ; }
16 warn "USAGE: `basename $0` VERSION_TAG (1.4.3_rc1 like)"
20 # -------------------------------------------
25 [1-9].[0-9] | [1-9].[0-9] ) tag="r$rel" ;;
26 [1-9].[0-9]_rc[1-9] | [1-9].[0-9]_rc[1-9] ) tag="r$rel" ;;
27 [1-9].[0-9].[0-9] | [1-9].[0-9].[0-9][0-9] ) tag="r$rel" ;;
28 [1-9].[0-9].[0-9]_rc[1-9] | [1-9].[0-9].[0-9][0-9]_rc[1-9] ) tag="r$rel" ;;
31 tag="` echo "$tag" | tr '.' '_' `"
33 # -------------------------------------------
37 CVSROOT=":pserver:anonymous@cvs.sourceforge.jp:/cvsroot/$mod"
39 pkg_dir="${mod}-${rel}"
41 # -------------------------------------------
44 test ! -d "$pkg_dir" || err "There's already a directory: $mod"
45 echo cvs -z3 -d "$CVSROOT" export -r "$tag" -d "$pkg_dir" "$mod"
46 cvs -z3 -d "$CVSROOT" export -r "$tag" -d "$pkg_dir" "$mod"
47 test -d "$pkg_dir" || err "There is'nt a directory: $pkg_dir"
50 # Remove '.cvsignore' if exists
51 echo find "$pkg_dir" -type f -name '.cvsignore' -delete
52 find "$pkg_dir" -type f -name '.cvsignore' -delete
58 find . -type d | while read line; do
61 find . -type f | while read line; do
65 # Add write permission for PukiWiki
66 chmod 777 attach backup cache counter diff trackback wiki*
67 chmod 666 wiki*/*.txt cache/*.dat
72 echo tar cf - "$pkg_dir" \| gzip -9 \> "$pkg_dir.tar.gz"
73 tar cf - "$pkg_dir" | gzip -9 > "$pkg_dir.tar.gz"
75 #echo rm -Rf "$pkg_dir"