Admin/makedist
author wenzelm
Fri, 07 Mar 1997 16:40:30 +0100
changeset 2776 7e99c2cbfb24
parent 2686 351c45bb338d
child 2794 2d259a41cd77
permissions -rwxr-xr-x
commented out chwon, chmod;
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2667
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
     1
#!/bin/bash -norc
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
     2
#
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
     3
# $Id$
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
     4
#
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
     5
# makedist -- make Isabelle distribution.
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
     6
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
     7
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
     8
## global settings
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
     9
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    10
LOGICS="CCL CTT Cube FOL FOLP HOL HOLCF LCF LK Modal Provers Pure Sequents TFL Tools ZF"
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    11
DOCS="Intro Ref Logics"
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    12
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    13
CVSROOT=/isabelle/archive
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    14
DISTBASE=~/tmp/isadist
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    15
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    16
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    17
## diagnostics
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    18
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    19
PRG=$(basename $0)
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    20
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    21
function usage()
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    22
{
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    23
  echo
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    24
  echo "Usage: $PRG VERSION"
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    25
  echo
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    26
  cat <<EOF
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    27
  Make Isabelle distribution from the master sources at TUM.
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    28
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    29
  VERSION may be either a tag like "Isabelle94-XX" that specifies the
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    30
  release to be exported from the repository, or "-" to checkout the
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    31
  current sources as an unofficial release.
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    32
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    33
  Checklist for official releases (before running this script):
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    34
2668
72a962676702 fixed Id comment;
wenzelm
parents: 2667
diff changeset
    35
    * Check that README files are up to date (should have Id: lines).
2667
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    36
    * Check that Pure/ROOT.ML/version is up to date!
2686
351c45bb338d tuned comment;
wenzelm
parents: 2668
diff changeset
    37
    * Check release name and date in NEWS!
2667
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    38
    * Make sure that the repository version of Doc is consistent
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    39
      (watch out for *.bbl, *.rao, *.ind)!
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    40
EOF
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    41
  #Wicked! We just won't tell other users ...
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    42
  if [ $LOGNAME = paulson -o $LOGNAME = nipkow -o $LOGNAME = wenzelm ]; then
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    43
    cat <<EOF
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    44
    * Tag the current repository version, e.g.:
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    45
        cvs rtag Isabelle94-XX isabelle
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    46
      PLEASE DON'T DO THIS UNLESS YOU KNOW WHAT YOU'RE DOING!
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    47
EOF
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    48
  fi
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    49
  cat <<EOF
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    50
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    51
  After the distribution has been created succesfully, you might want
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    52
  to run some makeall tests using different ML systems.
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    53
  
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    54
EOF
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    55
  exit 1
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    56
}
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    57
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    58
function fail()
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    59
{
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    60
  echo "$1" >&2
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    61
  exit 2
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    62
}
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    63
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    64
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    65
## process command line
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    66
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    67
[ $# -ne 1 ] && usage
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    68
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    69
VERSION="$1"
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    70
shift
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    71
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    72
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    73
## main
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    74
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    75
# dist version
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    76
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    77
DATE=$(date "+%d-%b-%Y")
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    78
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    79
if [ "$VERSION" = "-" ]; then
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    80
  DISTNAME=Isabelle_$DATE
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    81
  EXPORT="checkout"
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    82
  UNOFFICIAL=true
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    83
else
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    84
  DISTNAME="$VERSION"
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    85
  EXPORT="export -r $VERSION"
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    86
  UNOFFICIAL=""
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    87
fi
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    88
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    89
mkdir -p $DISTBASE || fail "Unable to create distribution base dir $DISTBASE!"
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    90
[ -e $DISTBASE/$DISTNAME ] && fail "$DISTBASE/$DISTNAME already exists!"
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    91
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    92
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    93
# export from repository
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    94
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    95
echo
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    96
echo "Exporting $DISTNAME from repository. Please be patient ..."
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    97
echo
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    98
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    99
cd $DISTBASE
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   100
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   101
export CVSROOT
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   102
cvs -f -q $EXPORT -d $DISTNAME isabelle
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   103
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   104
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   105
# make docs
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   106
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   107
for D in $DOCS
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   108
do
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   109
  cd $DISTBASE/$DISTNAME/Doc/$D
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   110
  make dist
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   111
done
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   112
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   113
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   114
# prepare dist dir for release
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   115
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   116
cd $DISTBASE/$DISTNAME
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   117
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   118
find . -name CVS -exec rm -rf {} \;
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   119
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   120
find Doc -name \*.dvi -exec mv {} Distribution/doc \;
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   121
rm -rf Admin Doc examples index.html
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   122
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   123
mkdir src
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   124
mv $LOGICS src
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   125
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   126
mv Distribution/* .
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   127
rmdir Distribution
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   128
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   129
if [ -n "$UNOFFICIAL" ]; then
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   130
  {
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   131
    echo
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   132
    echo "IMPORTANT NOTE"
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   133
    echo "=============="
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   134
    echo
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   135
    echo "This is an unofficial release of Isabelle, created by $LOGNAME $DATE."
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   136
    echo
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   137
  } >UNOFFICIAL
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   138
fi
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   139
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   140
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   141
# create archive
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   142
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   143
cd $DISTBASE
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   144
2776
7e99c2cbfb24 commented out chwon, chmod;
wenzelm
parents: 2686
diff changeset
   145
#FIXME doesn't work!?
7e99c2cbfb24 commented out chwon, chmod;
wenzelm
parents: 2686
diff changeset
   146
#chown -R $LOGNAME:isabelle $DISTNAME
7e99c2cbfb24 commented out chwon, chmod;
wenzelm
parents: 2686
diff changeset
   147
#chmod -R u+w $DISTNAME
7e99c2cbfb24 commented out chwon, chmod;
wenzelm
parents: 2686
diff changeset
   148
#chmod -R g-w $DISTNAME
2667
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   149
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   150
tar cf - $DISTNAME | gzip >$DISTNAME.tar.gz
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   151
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   152
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   153
# final note
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   154
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   155
echo
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   156
echo "That's it. You'll find the distribution in $DISTBASE."
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   157
echo