Admin/makedist
author wenzelm
Thu, 17 Apr 1997 14:41:08 +0200
changeset 2970 4ed0b27e482d
parent 2829 c6b491e837cb
child 3060 7c3564de392e
permissions -rwxr-xr-x
added fixencoding note;
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
2829
c6b491e837cb remove empty dirs;
wenzelm
parents: 2794
diff changeset
    10
LOGICS="CCL CTT Cube FOL FOLP HOL HOLCF LCF Provers Pure Sequents TFL Tools ZF"
2667
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!
2970
4ed0b27e482d added fixencoding note;
wenzelm
parents: 2829
diff changeset
    38
    * Make sure that encoding info is consistent (fixencoding)!
2667
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    39
    * Make sure that the repository version of Doc is consistent
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    40
      (watch out for *.bbl, *.rao, *.ind)!
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    41
EOF
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    42
  #Wicked! We just won't tell other users ...
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    43
  if [ $LOGNAME = paulson -o $LOGNAME = nipkow -o $LOGNAME = wenzelm ]; then
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    44
    cat <<EOF
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    45
    * Tag the current repository version, e.g.:
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    46
        cvs rtag Isabelle94-XX isabelle
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    47
      PLEASE DON'T DO THIS UNLESS YOU KNOW WHAT YOU'RE DOING!
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    48
EOF
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    49
  fi
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    50
  cat <<EOF
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    51
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    52
  After the distribution has been created succesfully, you might want
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    53
  to run some makeall tests using different ML systems.
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    54
  
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    55
EOF
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    56
  exit 1
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    57
}
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    58
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    59
function fail()
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    60
{
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    61
  echo "$1" >&2
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    62
  exit 2
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
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    66
## process command line
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    67
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    68
[ $# -ne 1 ] && usage
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    69
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    70
VERSION="$1"
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    71
shift
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    72
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    73
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    74
## main
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    75
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    76
# dist version
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    77
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    78
DATE=$(date "+%d-%b-%Y")
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    79
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    80
if [ "$VERSION" = "-" ]; then
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    81
  DISTNAME=Isabelle_$DATE
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    82
  EXPORT="checkout"
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    83
  UNOFFICIAL=true
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    84
else
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    85
  DISTNAME="$VERSION"
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    86
  EXPORT="export -r $VERSION"
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    87
  UNOFFICIAL=""
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    88
fi
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    89
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    90
mkdir -p $DISTBASE || fail "Unable to create distribution base dir $DISTBASE!"
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    91
[ -e $DISTBASE/$DISTNAME ] && fail "$DISTBASE/$DISTNAME already exists!"
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    92
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    93
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    94
# export from repository
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    95
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    96
echo
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    97
echo "Exporting $DISTNAME from repository. Please be patient ..."
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    98
echo
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    99
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   100
cd $DISTBASE
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   101
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   102
export CVSROOT
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   103
cvs -f -q $EXPORT -d $DISTNAME isabelle
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   104
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   105
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   106
# make docs
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   107
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   108
for D in $DOCS
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   109
do
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   110
  cd $DISTBASE/$DISTNAME/Doc/$D
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   111
  make dist
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   112
done
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   113
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   114
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   115
# prepare dist dir for release
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   116
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   117
cd $DISTBASE/$DISTNAME
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   118
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   119
find . -name CVS -exec rm -rf {} \;
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   120
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   121
find Doc -name \*.dvi -exec mv {} Distribution/doc \;
2829
c6b491e837cb remove empty dirs;
wenzelm
parents: 2794
diff changeset
   122
rm -rf Admin Doc examples Modal LK HOLCF/explicit_domains
2667
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   123
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   124
mkdir src
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   125
mv $LOGICS src
2829
c6b491e837cb remove empty dirs;
wenzelm
parents: 2794
diff changeset
   126
mv index.html src
2667
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   127
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   128
mv Distribution/* .
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   129
rmdir Distribution
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   130
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   131
if [ -n "$UNOFFICIAL" ]; then
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   132
  {
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   133
    echo
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   134
    echo "IMPORTANT NOTE"
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   135
    echo "=============="
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   136
    echo
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   137
    echo "This is an unofficial release of Isabelle, created by $LOGNAME $DATE."
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   138
    echo
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   139
  } >UNOFFICIAL
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   140
fi
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   141
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   142
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   143
# create archive
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   144
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   145
cd $DISTBASE
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   146
2794
2d259a41cd77 uncommented chown / chmod (again);
wenzelm
parents: 2776
diff changeset
   147
#FIXME sometimes doesn't work!?
2d259a41cd77 uncommented chown / chmod (again);
wenzelm
parents: 2776
diff changeset
   148
chown -R $LOGNAME:isabelle $DISTNAME
2d259a41cd77 uncommented chown / chmod (again);
wenzelm
parents: 2776
diff changeset
   149
chmod -R u+w $DISTNAME
2d259a41cd77 uncommented chown / chmod (again);
wenzelm
parents: 2776
diff changeset
   150
chmod -R g+w $DISTNAME
2667
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   151
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   152
tar cf - $DISTNAME | gzip >$DISTNAME.tar.gz
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   153
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   154
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   155
# final note
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   156
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   157
echo
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   158
echo "That's it. You'll find the distribution in $DISTBASE."
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   159
echo