OSDN Git Service

Added --norm option
[pukiwiki/pukiwiki_devel.git] / release.sh
index 511f3a3..c29798e 100755 (executable)
@@ -1,5 +1,5 @@
 #!/bin/sh
-# $Id: release.sh,v 1.18 2005/04/10 09:28:13 henoheno Exp $
+# $Id: release.sh,v 1.19 2005/04/17 05:04:13 henoheno Exp $
 # $CVSKNIT_Id: release.sh,v 1.11 2004/05/28 14:26:24 henoheno Exp $
 #  Release automation script for PukiWiki
 #  ==========================================================
@@ -16,6 +16,7 @@ usage(){
   warn  "Usage: $_name [options] VERSION_TAG (1.4.3_rc1 like)"
   warn  "  Options:"
   warn  "    --nopkg     Suppress creating archive (Extract and chmod only)"
+  warn  "    --norm      --nopkg, and remove nothing (.cvsignore etc)"
   warn  "    -z|--zip    Create *.zip archive"
   warn  "    --move-dist Move *.ini.php => *.ini-dist.php"
   warn  "    --copy-dist Move, and Copy *.ini.php <= *.ini-dist.php"
@@ -77,6 +78,7 @@ getopt(){ _arg=noarg
   -[hH]|--help ) echo _help _exit ;;
   --debug      ) echo _debug      ;;
   --nopkg      ) echo _nopkg      ;;
+  --norm|--noremove ) echo _noremove ;;
   -z|--zip     ) echo _zip        ;;
   --copy-dist  ) echo _copy_dist  ;;
   --move-dist  ) echo _move_dist  ;;
@@ -146,8 +148,10 @@ echo cvs -z3 -d "$CVSROOT" -q export -r "$tag" -d "$pkg_dir" "$mod"
 test   -d "$pkg_dir" || err "There is'nt a directory: $pkg_dir"
 
 # Remove '.cvsignore' if exists -----------------------------
-echo find "$pkg_dir" -type f -name '.cvsignore' "| xargs rm -f"
-     find "$pkg_dir" -type f -name '.cvsignore' | xargs rm -f
+test -z "$__noremove" && {
+  echo find "$pkg_dir" -type f -name '.cvsignore' "| xargs rm -f"
+       find "$pkg_dir" -type f -name '.cvsignore' | xargs rm -f
+}
 
 # chmod -----------------------------------------------------
 
@@ -155,7 +159,7 @@ chmod_pkg "$pkg_dir"
 
 # Create a package ------------------------------------------
 
-test ! -z "$__nopkg" && exit 0
+test ! -z "$__nopkg$__noremove" && exit 0
 
 ( cd "$pkg_dir"