/[cmucl]/src/tools/make-src-dist.sh
ViewVC logotype

Contents of /src/tools/make-src-dist.sh

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (hide annotations)
Mon Jun 27 15:45:19 2011 UTC (2 years, 9 months ago) by rtoy
Branch: MAIN
CVS Tags: GIT-CONVERSION, snapshot-2011-09, snapshot-2011-07, HEAD
Changes since 1.2: +15 -2 lines
File MIME type: application/x-sh
Usability and internal restructuring.

o Add usage message.
o Don't include the emacs-style backup files that are sometimes
  created for the pot files.
1 rtoy 1.1 #!/bin/sh
2    
3 rtoy 1.3 usage() {
4     echo "make-src-dist.sh: [-bgh] [-t gnutar] [-I destdir] version"
5     echo " -h This help"
6     echo " -b Use bzip2 compression"
7     echo " -g Use gzip compression"
8     echo " -t tar Name/path to GNU tar"
9     echo " -I destdir Install directly to given directory instead of creating a tarball"
10     echo ""
11     echo 'Create a tar ball of the cmucl sources. The tarball is named '
12     echo 'cmucl-src-$version.tar.bz2 (or gz if using gzip compression)'
13     }
14    
15 rtoy 1.2 while getopts "bgh?t:I:" arg
16 rtoy 1.1 do
17     case $arg in
18     b) ENABLE_BZIP=-b ;;
19     g) ENABLE_GZIP=-g ;;
20     t) GTAR=$OPTARG ;;
21 rtoy 1.2 I) INSTALL_DIR=$OPTARG ;;
22 rtoy 1.1 h | \?) usage; exit 1 ;;
23     esac
24     done
25    
26     shift `expr $OPTIND - 1`
27    
28     VERSION=$1
29    
30     echo Creating source distribution
31     if [ -n "$ENABLE_GZIP" ]; then
32     ZIP="gzip -c"
33     ZIPEXT="gz"
34     fi
35     if [ -n "$ENABLE_BZIP" ]; then
36     ZIP="bzip2"
37     ZIPEXT="bz2"
38     fi
39    
40 rtoy 1.3 GTAR_OPTIONS="--exclude=CVS --exclude='*.pot.~*~'"
41 rtoy 1.2 if [ -z "$INSTALL_DIR" ]; then
42     echo " Compressing with $ZIP"
43 rtoy 1.3 ${GTAR:-tar} ${GTAR_OPTIONS} -cf - src | ${ZIP} > cmucl-src-$VERSION.tar.$ZIPEXT
44 rtoy 1.2 else
45     # Install in the specified directory
46 rtoy 1.3 ${GTAR:-tar} ${GTAR_OPTIONS} -cf - src | (cd $INSTALL_DIR; ${GTAR:-tar} xf -)
47 rtoy 1.2 fi

  ViewVC Help
Powered by ViewVC 1.1.5