makedist -- make Isabelle distribution.
authorwenzelm
Thu Feb 20 17:02:42 1997 +0100 (1997-02-20)
changeset 2667b2172eab9ba6
parent 2666 995d34955791
child 2668 72a962676702
makedist -- make Isabelle distribution.
Admin/makedist
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/Admin/makedist	Thu Feb 20 17:02:42 1997 +0100
     1.3 @@ -0,0 +1,155 @@
     1.4 +#!/bin/bash -norc
     1.5 +#
     1.6 +# $Id$
     1.7 +#
     1.8 +# makedist -- make Isabelle distribution.
     1.9 +
    1.10 +
    1.11 +## global settings
    1.12 +
    1.13 +LOGICS="CCL CTT Cube FOL FOLP HOL HOLCF LCF LK Modal Provers Pure Sequents TFL Tools ZF"
    1.14 +DOCS="Intro Ref Logics"
    1.15 +
    1.16 +CVSROOT=/isabelle/archive
    1.17 +DISTBASE=~/tmp/isadist
    1.18 +
    1.19 +
    1.20 +## diagnostics
    1.21 +
    1.22 +PRG=$(basename $0)
    1.23 +
    1.24 +function usage()
    1.25 +{
    1.26 +  echo
    1.27 +  echo "Usage: $PRG VERSION"
    1.28 +  echo
    1.29 +  cat <<EOF
    1.30 +  Make Isabelle distribution from the master sources at TUM.
    1.31 +
    1.32 +  VERSION may be either a tag like "Isabelle94-XX" that specifies the
    1.33 +  release to be exported from the repository, or "-" to checkout the
    1.34 +  current sources as an unofficial release.
    1.35 +
    1.36 +  Checklist for official releases (before running this script):
    1.37 +
    1.38 +    * Check that README files are up to date (should have \$Id$ lines).
    1.39 +    * Check that Pure/ROOT.ML/version is up to date!
    1.40 +    * Make sure that the repository version of Doc is consistent
    1.41 +      (watch out for *.bbl, *.rao, *.ind)!
    1.42 +EOF
    1.43 +  #Wicked! We just won't tell other users ...
    1.44 +  if [ $LOGNAME = paulson -o $LOGNAME = nipkow -o $LOGNAME = wenzelm ]; then
    1.45 +    cat <<EOF
    1.46 +    * Tag the current repository version, e.g.:
    1.47 +        cvs rtag Isabelle94-XX isabelle
    1.48 +      PLEASE DON'T DO THIS UNLESS YOU KNOW WHAT YOU'RE DOING!
    1.49 +EOF
    1.50 +  fi
    1.51 +  cat <<EOF
    1.52 +
    1.53 +  After the distribution has been created succesfully, you might want
    1.54 +  to run some makeall tests using different ML systems.
    1.55 +  
    1.56 +EOF
    1.57 +  exit 1
    1.58 +}
    1.59 +
    1.60 +function fail()
    1.61 +{
    1.62 +  echo "$1" >&2
    1.63 +  exit 2
    1.64 +}
    1.65 +
    1.66 +
    1.67 +## process command line
    1.68 +
    1.69 +[ $# -ne 1 ] && usage
    1.70 +
    1.71 +VERSION="$1"
    1.72 +shift
    1.73 +
    1.74 +
    1.75 +## main
    1.76 +
    1.77 +# dist version
    1.78 +
    1.79 +DATE=$(date "+%d-%b-%Y")
    1.80 +
    1.81 +if [ "$VERSION" = "-" ]; then
    1.82 +  DISTNAME=Isabelle_$DATE
    1.83 +  EXPORT="checkout"
    1.84 +  UNOFFICIAL=true
    1.85 +else
    1.86 +  DISTNAME="$VERSION"
    1.87 +  EXPORT="export -r $VERSION"
    1.88 +  UNOFFICIAL=""
    1.89 +fi
    1.90 +
    1.91 +mkdir -p $DISTBASE || fail "Unable to create distribution base dir $DISTBASE!"
    1.92 +[ -e $DISTBASE/$DISTNAME ] && fail "$DISTBASE/$DISTNAME already exists!"
    1.93 +
    1.94 +
    1.95 +# export from repository
    1.96 +
    1.97 +echo
    1.98 +echo "Exporting $DISTNAME from repository. Please be patient ..."
    1.99 +echo
   1.100 +
   1.101 +cd $DISTBASE
   1.102 +
   1.103 +export CVSROOT
   1.104 +cvs -f -q $EXPORT -d $DISTNAME isabelle
   1.105 +
   1.106 +
   1.107 +# make docs
   1.108 +
   1.109 +for D in $DOCS
   1.110 +do
   1.111 +  cd $DISTBASE/$DISTNAME/Doc/$D
   1.112 +  make dist
   1.113 +done
   1.114 +
   1.115 +
   1.116 +# prepare dist dir for release
   1.117 +
   1.118 +cd $DISTBASE/$DISTNAME
   1.119 +
   1.120 +find . -name CVS -exec rm -rf {} \;
   1.121 +
   1.122 +find Doc -name \*.dvi -exec mv {} Distribution/doc \;
   1.123 +rm -rf Admin Doc examples index.html
   1.124 +
   1.125 +mkdir src
   1.126 +mv $LOGICS src
   1.127 +
   1.128 +mv Distribution/* .
   1.129 +rmdir Distribution
   1.130 +
   1.131 +if [ -n "$UNOFFICIAL" ]; then
   1.132 +  {
   1.133 +    echo
   1.134 +    echo "IMPORTANT NOTE"
   1.135 +    echo "=============="
   1.136 +    echo
   1.137 +    echo "This is an unofficial release of Isabelle, created by $LOGNAME $DATE."
   1.138 +    echo
   1.139 +  } >UNOFFICIAL
   1.140 +fi
   1.141 +
   1.142 +
   1.143 +# create archive
   1.144 +
   1.145 +cd $DISTBASE
   1.146 +
   1.147 +chown -R $LOGNAME:isabelle $DISTNAME
   1.148 +chmod -R u+w $DISTNAME
   1.149 +chmod -R g-w $DISTNAME
   1.150 +
   1.151 +tar cf - $DISTNAME | gzip >$DISTNAME.tar.gz
   1.152 +
   1.153 +
   1.154 +# final note
   1.155 +
   1.156 +echo
   1.157 +echo "That's it. You'll find the distribution in $DISTBASE."
   1.158 +echo