harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dlyd...@apache.org
Subject svn commit: r326449 - /incubator/harmony/enhanced/trunk/sandbox/contribs/bootjvm/bootJVM/dist-src.sh
Date Wed, 19 Oct 2005 08:04:16 GMT
Author: dlydick
Date: Wed Oct 19 01:04:07 2005
New Revision: 326449

URL: http://svn.apache.org/viewcvs?rev=326449&view=rev
Log:
Verify with user that the configured release level is the actual
release number target that should be built and recommend running
'config.sh' if this is not accurate.

Create distribution .tar.gz files at '..' instead of '../..' now that
the SVN repository is in use and its structure is known.

Add distribution of source _only_ and source _with_ docs.
The result will be  'bootJVM-src-CONFIG_RELEASE_LEVEL.tar.gz'
and 'bootJVM-srcdoc-CONFIG_RELEASE_LEVEL.tar.gz'.  This latter
file will contain the documentation package (old behavior of
the script) while the former one (the old file name containing
both) will not.

Use symbolic link for release path name.

Filter out '.svn' subdirectories from 'tar' output.

Minor functional adjustments visible only internal to the script.

Modified:
    incubator/harmony/enhanced/trunk/sandbox/contribs/bootjvm/bootJVM/dist-src.sh

Modified: incubator/harmony/enhanced/trunk/sandbox/contribs/bootjvm/bootJVM/dist-src.sh
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/trunk/sandbox/contribs/bootjvm/bootJVM/dist-src.sh?rev=326449&r1=326448&r2=326449&view=diff
==============================================================================
--- incubator/harmony/enhanced/trunk/sandbox/contribs/bootjvm/bootJVM/dist-src.sh (original)
+++ incubator/harmony/enhanced/trunk/sandbox/contribs/bootjvm/bootJVM/dist-src.sh Wed Oct
19 01:04:07 2005
@@ -3,7 +3,8 @@
 #!
 # @file ./dist-src.sh
 #
-# @brief Distribute Boot JVM source package.
+# @brief Distribute Boot JVM source package, with and without \
+# documentation package.
 #
 # Clean up all build targets so that only source remains.
 # Then create pre-formatted documentation for installation
@@ -23,12 +24,15 @@
 #             This will ensure immediate access to them by
 #             Eclipse users without having to change anything.
 #
-# @todo A Windows .BAT version of this script needs to be written
+# @todo  HARMONY-6-dist-src.sh-1 A Windows .BAT version of this
+#        script needs to be written
 #
 #
 # @section Control
 #
-# \$URL$ \$Id$
+# \$URL$
+#
+# \$Id$
 #
 # Copyright 2005 The Apache Software Foundation
 # or its licensors, as applicable.
@@ -52,6 +56,7 @@
 # @date \$LastChangedDate$
 #
 # @author \$LastChangedBy$
+#
 #         Original code contributed by Daniel Lydick on 09/28/2005.
 #
 # @section Reference
@@ -103,6 +108,9 @@
 # rebuild documentation in _all_ formats, archive it, and
 # then delete it.  Package the result in final 'tar' file.
 #
+DistChkReleaseLevel
+
+DistChkTarget
 
 DistPrep
 
@@ -134,66 +142,127 @@
 echo ""
 echo "$PGMNAME: Setting directory permissions"
 umask 022
-chmod 0755 `find . -type d -print`
+chmod 0755 `find . -type d -print | egrep -v "/\.svn"`
 
 echo ""
 echo "$PGMNAME: Setting source file permissions"
-chmod 0644 `find . -type f -name \*.c -print`
-chmod 0644 `find . -type f -name \*.h -print`
-chmod 0644 `find . -type f -name \*.java -print`
-chmod 0755 `find . -type f -name \*.sh -print`
-chmod 0644 `find . -type f -name \*.dox -print`
-chmod 0644 [ILR]*
-chmod 0644 `find . -type f -name .\?\?\* -print`
+chmod 0644 `find . -type f -name \*.c -print | egrep -v "/\.svn"`
+chmod 0644 `find . -type f -name \*.h -print | egrep -v "/\.svn"`
+chmod 0644 `find . -type f -name \*.java -print | egrep -v "/\.svn"`
+chmod 0755 `find . -type f -name \*.sh -print | egrep -v "/\.svn"`
+chmod 0644 `find . -type f -name \*.dox -print | egrep -v "/\.svn"`
+chmod 0644 [A-Z]*
+chmod 0644 `find . -type f -name .\?\?\* -print | egrep -v "/\.svn"`
 
 DistTargetBuild dox
 
-DistDocTar
+# Time stamp all files together
+TMPTIMESTAMPFILE=${TMPDIR:-/tmp}/tmp.$PGMNAME.$$
+rm -f $TMPTIMESTAMPFILE
+touch $TMPTIMESTAMPFILE
+
+# Itemize all files and symbolic links, less SVN administrative areas
+for f in `find . -type f -print | egrep -v "/\.svn"`
+do
+    # Any file that complains here is not listed in the known file types
+    touch -r $TMPTIMESTAMPFILE $f
+done
+rm -f $TMPTIMESTAMPFILE
 
-chmod +w `find . -print`
-touch `find . -print`
+DistDocTar
 
 DistDocUnPrep
 
 DistConfigPrep
 
 echo ""
-echo "$PGMNAME: Creating distribution file '../../$DISTSRCTAR'"
+echo "$PGMNAME: Creating distribution file '../$DISTSRCDOCTAR'"
 
-cd ../..
-rm -f $DISTSRCTAR
-tar cf $DISTSRCTAR harmony/bootJVM
-if test ! -r $DISTSRCTAR
+cd ..
+ln -s bootJVM $TARGET_HOME
+
+rm -f $DISTSRCDOCTAR $DISTSRCDOCTAR.gz
+
+# Itemize all files and symbolic links, less SVN administrative areas
+SRCTARCFCMD=`(find bootJVM -type l -print; \
+              find bootJVM -type f -print) |\
+              egrep -v "/\.svn|$PREFMTDOCSTAR" | \
+              sed "s/^bootJVM/$TARGET_HOME/" | \
+              sort`
+
+tar cf $DISTSRCDOCTAR $SRCTARCFCMD $TARGET_HOME/$PREFMTDOCSTAR.gz
+if test ! -r $DISTSRCDOCTAR
 then
     echo ""
-    echo "$PGMNAME: Directory `cd ../..; pwd` is not writable."
+    echo "$PGMNAME: Cannot locate '../$DISTSRCDOCTAR'."
+    echo "$PGMNAME: Directory `cd ..; pwd` is probably not writable."
     echo "$PGMNAME: Please make it writable and try again."
     exit 5
 fi
 
 echo ""
 echo \
-   "$PGMNAME: Compressing distribution file into '../../$DISTSRCTAR.gz'"
+   "$PGMNAME: Compressing distribution file into '../$DISTSRCDOCTAR.gz'"
+gzip $DISTSRCDOCTAR
+if test ! -r $DISTSRCDOCTAR.gz
+then
+    echo ""
+    echo "$PGMNAME: Cannot compress into '$DISTSRCDOCTAR.gz'"
+    exit 6
+fi
+
+chmod 0444 $DISTSRCDOCTAR.gz
+
+echo ""
+echo "$PGMNAME: Creating distribution file '../$DISTSRCTAR'"
+
+rm -f $DISTSRCTAR $DISTSRCTAR.gz
+
+#
+# Temporarily remove documentation package, create distribution file,
+# and restore it.
+#
+rm -f $TARGET_HOME/$PREFMTDOCSTAR.gz
+
+# Itemize all files and symbolic links, less SVN administrative areas
+tar cf $DISTSRCTAR $SRCTARCFCMD
+cat $DISTSRCDOCTAR.gz | gunzip | tar xf - $TARGET_HOME/$PREFMTDOCSTAR.gz
+
+if test ! -r $DISTSRCTAR
+then
+    echo ""
+    echo "$PGMNAME: Cannot locate '../$DISTSRCTAR'."
+    echo "$PGMNAME: Directory `cd ..; pwd` is probably not writable."
+    echo "$PGMNAME: Please make it writable and try again."
+    exit 7
+fi
+
+echo ""
+echo \
+   "$PGMNAME: Compressing distribution file into '../$DISTSRCTAR.gz'"
 rm -f $DISTSRCTAR.gz
 gzip $DISTSRCTAR
 if test ! -r $DISTSRCTAR.gz
 then
     echo ""
     echo "$PGMNAME: Cannot compress into '$DISTSRCTAR.gz'"
-    exit 6
+    exit 8
 fi
 
 chmod 0444 $DISTSRCTAR.gz
-cd harmony/bootJVM
+
+rm $TARGET_HOME
+cd bootJVM
 
 DistConfigUnPrep
 
 DistUnPrep
 
 echo ""
-echo "$PGMNAME: Source distribution tar file created:"
+echo "$PGMNAME: Source distribution tar files created:"
 echo ""
-ls -l ../../$DISTSRCTAR.gz
+ls -l ../$DISTSRCTAR.gz
+ls -l ../$DISTSRCDOCTAR.gz
 echo ""
 
 ###################################################################



Mime
View raw message