expat make-release.sh,1.4,1.5
"Fred L. Drake" <[email protected]>
| Newsgroups | gmane.text.xml.expat.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/expat/expat In directory sc8-pr-cvs1:/tmp/cvs-serv11575 Modified Files: make-release.sh Log Message: - try to be smarter about the options to cp - use indentation consistently - one we've built the tarball successfully, clean up the 2nd temp dir Index: make-release.sh =================================================================== RCS file: /cvsroot/expat/expat/make-release.sh,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- make-release.sh 25 Jul 2002 15:21:06 -0000 1.4 +++ make-release.sh 20 Jan 2003 15:25:20 -0000 1.5 @@ -33,9 +33,9 @@ echo "Release version: $vsn" if test "$1" = HEAD ; then - distdir=expat-`date '+%Y-%m-%d'` + distdir=expat-`date '+%Y-%m-%d'` else - distdir=expat-$vsn + distdir=expat-$vsn fi if test -e $distdir; then echo "ERROR: for safety, you must manually remove $distdir." @@ -44,13 +44,20 @@ fi mkdir $distdir || exit 1 +CPOPTS=-Pp +if (cp --version 2>/dev/null | grep -q 'Free Software Foundation') ; then + # If we're using GNU cp, we can avoid the warnings about forward + # compatibility of the options. + CPOPTS='--parents --preserve' +fi + echo "" echo "----------------------------------------------------------------------" echo "Building $distdir based on the MANIFEST:" files="`sed -e 's/[ ]:.*$//' $tmpdir/MANIFEST`" for file in $files; do echo "Copying $file..." - (cd $tmpdir && cp -Pp $file ../$distdir) || exit 1 + (cd $tmpdir && cp $CPOPTS $file ../$distdir) || exit 1 done echo "" @@ -60,6 +67,7 @@ tarball=$distdir.tar.gz echo "Constructing $tarball..." -tar cf - $distdir | gzip -9 > $tarball +tar cf - $distdir | gzip -9 > $tarball || exit $? +rm -r $distdir echo "Done."