Admin/makedist
author wenzelm
Mon, 26 Sep 2005 13:12:24 +0200
changeset 17649 631b99d49809
parent 17606 6527ba893bae
child 17651 a6499b0c5a40
permissions -rwxr-xr-x
echo HOL_USERDIR_OPTIONS;
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
12721
226fc0e2e7e3 #!/usr/bin/env bash;
wenzelm
parents: 11981
diff changeset
     1
#!/usr/bin/env bash
2667
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
#
10077
wenzelm
parents: 10068
diff changeset
     5
# makedist -- make Isabelle source distribution.
2667
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
17554
d16abc8f4fb0 removed "--" argument;
wenzelm
parents: 16508
diff changeset
    10
DISTPREFIX=${DISTPREFIX:-~/tmp/isadist}
7993
wenzelm
parents: 7859
diff changeset
    11
LOGICS="CCL CTT Cube FOL FOLP HOL HOLCF LCF Provers Pure Sequents TFL ZF"
2667
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    12
17554
d16abc8f4fb0 removed "--" argument;
wenzelm
parents: 16508
diff changeset
    13
export CVSROOT=/usr/proj/isabelle-repository/archive
d16abc8f4fb0 removed "--" argument;
wenzelm
parents: 16508
diff changeset
    14
[ ! -d "$CVSROOT" ] && CVSROOT="sunbroy2.informatik.tu-muenchen.de:$CVSROOT"
2667
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    15
9797
49e55730eb7a provide "--" argument: tentative release;
wenzelm
parents: 9782
diff changeset
    16
umask 022
49e55730eb7a provide "--" argument: tentative release;
wenzelm
parents: 9782
diff changeset
    17
9920
9734f2717203 improved WWW page generation (still somewhat experimental);
wenzelm
parents: 9880
diff changeset
    18
TAR=tar
9734f2717203 improved WWW page generation (still somewhat experimental);
wenzelm
parents: 9880
diff changeset
    19
type -path gtar >/dev/null && TAR=gtar
9734f2717203 improved WWW page generation (still somewhat experimental);
wenzelm
parents: 9880
diff changeset
    20
9734f2717203 improved WWW page generation (still somewhat experimental);
wenzelm
parents: 9880
diff changeset
    21
FIND=find
9734f2717203 improved WWW page generation (still somewhat experimental);
wenzelm
parents: 9880
diff changeset
    22
type -path gfind >/dev/null && FIND=gfind
9734f2717203 improved WWW page generation (still somewhat experimental);
wenzelm
parents: 9880
diff changeset
    23
2667
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    24
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    25
## diagnostics
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    26
9797
49e55730eb7a provide "--" argument: tentative release;
wenzelm
parents: 9782
diff changeset
    27
PRG=$(basename "$0")
49e55730eb7a provide "--" argument: tentative release;
wenzelm
parents: 9782
diff changeset
    28
THIS=$(cd $(dirname "$0"); echo "$PWD")
2667
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    29
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    30
function usage()
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    31
{
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    32
  cat <<EOF
11062
wenzelm
parents: 10928
diff changeset
    33
17554
d16abc8f4fb0 removed "--" argument;
wenzelm
parents: 16508
diff changeset
    34
Usage: $PRG VERSION [NAME]
11062
wenzelm
parents: 10928
diff changeset
    35
2667
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    36
  Make Isabelle distribution from the master sources at TUM.
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    37
17560
wenzelm
parents: 17558
diff changeset
    38
  VERSION may be either a tag like "Isabelle2003" that specifies the
2667
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    39
  release to be exported from the repository, or "-" to checkout the
17554
d16abc8f4fb0 removed "--" argument;
wenzelm
parents: 16508
diff changeset
    40
  current sources as an unofficial release.
d16abc8f4fb0 removed "--" argument;
wenzelm
parents: 16508
diff changeset
    41
d16abc8f4fb0 removed "--" argument;
wenzelm
parents: 16508
diff changeset
    42
  NAME specifies an explicit distribution name, by default it is
d16abc8f4fb0 removed "--" argument;
wenzelm
parents: 16508
diff changeset
    43
  derived from VERSION.
2667
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    44
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    45
  Checklist for official releases (before running this script):
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    46
17554
d16abc8f4fb0 removed "--" argument;
wenzelm
parents: 16508
diff changeset
    47
    * Check Admin/website contents.
d16abc8f4fb0 removed "--" argument;
wenzelm
parents: 16508
diff changeset
    48
    * Check ANNOUNCE, README.html, INSTALL, NEWS, COPYRIGHT, CONTRIBUTORS.
11062
wenzelm
parents: 10928
diff changeset
    49
    * Try "isatool makeall all" with Poly/ML, SML/NJ, etc.
2667
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    50
    * Tag the current repository version, e.g.:
17560
wenzelm
parents: 17558
diff changeset
    51
        cvs -d /usr/proj/isabelle-repository/archive rtag Isabelle2003 isabelle
11062
wenzelm
parents: 10928
diff changeset
    52
      PLEASE DO NOT DO THIS UNLESS YOU KNOW WHAT YOU ARE DOING!
5727
1b708bfb0c1e fixed index.html;
wenzelm
parents: 5725
diff changeset
    53
2667
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
17554
d16abc8f4fb0 removed "--" argument;
wenzelm
parents: 16508
diff changeset
    67
[ "$#" -ne 1 -a "$#" -ne 2 ] && usage
d16abc8f4fb0 removed "--" argument;
wenzelm
parents: 16508
diff changeset
    68
d16abc8f4fb0 removed "--" argument;
wenzelm
parents: 16508
diff changeset
    69
VERSION="$1"; shift
2667
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    70
17554
d16abc8f4fb0 removed "--" argument;
wenzelm
parents: 16508
diff changeset
    71
if [ "$#" -eq 0 ]; then
d16abc8f4fb0 removed "--" argument;
wenzelm
parents: 16508
diff changeset
    72
  DISTNAME=""
d16abc8f4fb0 removed "--" argument;
wenzelm
parents: 16508
diff changeset
    73
else
d16abc8f4fb0 removed "--" argument;
wenzelm
parents: 16508
diff changeset
    74
  DISTNAME="$1"; shift
d16abc8f4fb0 removed "--" argument;
wenzelm
parents: 16508
diff changeset
    75
fi
2667
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    76
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    77
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    78
## main
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    79
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    80
# dist version
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    81
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    82
DATE=$(date "+%d-%b-%Y")
4979
8b94f31a3022 README, Pure/ROOT.ML: version set automatically;
wenzelm
parents: 4550
diff changeset
    83
DISTDATE=$(date "+%B %Y")
2667
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    84
17554
d16abc8f4fb0 removed "--" argument;
wenzelm
parents: 16508
diff changeset
    85
if [ "$VERSION" = "-" ]; then
d16abc8f4fb0 removed "--" argument;
wenzelm
parents: 16508
diff changeset
    86
  DISTIDENT="Isabelle_$DATE"
d16abc8f4fb0 removed "--" argument;
wenzelm
parents: 16508
diff changeset
    87
  [ -z "$DISTNAME" ] && DISTNAME="$DISTIDENT"
9797
49e55730eb7a provide "--" argument: tentative release;
wenzelm
parents: 9782
diff changeset
    88
  DISTVERSION="$DISTNAME"
49e55730eb7a provide "--" argument: tentative release;
wenzelm
parents: 9782
diff changeset
    89
  EXPORT="cvs -f -q checkout -P -d $DISTNAME isabelle"
17558
wenzelm
parents: 17554
diff changeset
    90
  UNOFFICIAL=true
2667
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    91
else
17554
d16abc8f4fb0 removed "--" argument;
wenzelm
parents: 16508
diff changeset
    92
  DISTIDENT="$VERSION"
d16abc8f4fb0 removed "--" argument;
wenzelm
parents: 16508
diff changeset
    93
  [ -z "$DISTNAME" ] && DISTNAME="$DISTIDENT"
4982
6f96354267e0 tuned dist version;
wenzelm
parents: 4979
diff changeset
    94
  DISTVERSION="$DISTNAME: $DISTDATE"
17561
bde06ed41123 fixed cvs export;
wenzelm
parents: 17560
diff changeset
    95
  EXPORT="cvs -f -q export -r $VERSION -d $DISTNAME isabelle"
2667
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    96
  UNOFFICIAL=""
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    97
fi
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    98
9797
49e55730eb7a provide "--" argument: tentative release;
wenzelm
parents: 9782
diff changeset
    99
DISTBASE="$DISTPREFIX/dist-$DISTNAME"
49e55730eb7a provide "--" argument: tentative release;
wenzelm
parents: 9782
diff changeset
   100
mkdir -p "$DISTBASE" || fail "Unable to create distribution base dir $DISTBASE!"
49e55730eb7a provide "--" argument: tentative release;
wenzelm
parents: 9782
diff changeset
   101
[ -e "$DISTBASE/$DISTNAME" ] && fail "$DISTBASE/$DISTNAME already exists!"
49e55730eb7a provide "--" argument: tentative release;
wenzelm
parents: 9782
diff changeset
   102
[ -e "$DISTBASE/pdf/$DISTNAME" ] && fail "$DISTBASE/pdf/$DISTNAME already exists!"
2667
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   103
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   104
9797
49e55730eb7a provide "--" argument: tentative release;
wenzelm
parents: 9782
diff changeset
   105
# export repository
2667
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   106
9797
49e55730eb7a provide "--" argument: tentative release;
wenzelm
parents: 9782
diff changeset
   107
echo "###"
17554
d16abc8f4fb0 removed "--" argument;
wenzelm
parents: 16508
diff changeset
   108
echo "### Exporting $DISTIDENT ..."
9797
49e55730eb7a provide "--" argument: tentative release;
wenzelm
parents: 9782
diff changeset
   109
echo "###"
2667
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   110
9797
49e55730eb7a provide "--" argument: tentative release;
wenzelm
parents: 9782
diff changeset
   111
cd "$DISTBASE"
2667
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   112
13230
c5fad3c40d45 fail more gracefully, return proper exit codes, allow preset DISTPREFIX
kleing
parents: 13100
diff changeset
   113
$EXPORT || fail "Export failed!"
15438
dfc7d2a824d6 Added ChangeLog
berghofe
parents: 13803
diff changeset
   114
dfc7d2a824d6 Added ChangeLog
berghofe
parents: 13803
diff changeset
   115
if [ -n "$CVS2CL" ]; then
dfc7d2a824d6 Added ChangeLog
berghofe
parents: 13803
diff changeset
   116
  cd $DISTNAME
dfc7d2a824d6 Added ChangeLog
berghofe
parents: 13803
diff changeset
   117
  $CVS2CL
dfc7d2a824d6 Added ChangeLog
berghofe
parents: 13803
diff changeset
   118
  gzip ChangeLog
dfc7d2a824d6 Added ChangeLog
berghofe
parents: 13803
diff changeset
   119
  mv ChangeLog.gz ..
dfc7d2a824d6 Added ChangeLog
berghofe
parents: 13803
diff changeset
   120
  cd ..
dfc7d2a824d6 Added ChangeLog
berghofe
parents: 13803
diff changeset
   121
fi
dfc7d2a824d6 Added ChangeLog
berghofe
parents: 13803
diff changeset
   122
9920
9734f2717203 improved WWW page generation (still somewhat experimental);
wenzelm
parents: 9880
diff changeset
   123
$FIND . -name CVS -print | xargs rm -rf
12986
58cd2ca93edc delete .cvsignore;
wenzelm
parents: 12721
diff changeset
   124
$FIND . -name .cvsignore -print | xargs rm -rf
17554
d16abc8f4fb0 removed "--" argument;
wenzelm
parents: 16508
diff changeset
   125
$FIND . "(" -name \*.thy -o -name \*.ML ")" -perm +111 -print | xargs chmod -x
2667
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   126
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   127
9797
49e55730eb7a provide "--" argument: tentative release;
wenzelm
parents: 9782
diff changeset
   128
# build docs
2667
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   129
9797
49e55730eb7a provide "--" argument: tentative release;
wenzelm
parents: 9782
diff changeset
   130
echo "###"
49e55730eb7a provide "--" argument: tentative release;
wenzelm
parents: 9782
diff changeset
   131
echo "### Building docs ..."
49e55730eb7a provide "--" argument: tentative release;
wenzelm
parents: 9782
diff changeset
   132
echo "###"
49e55730eb7a provide "--" argument: tentative release;
wenzelm
parents: 9782
diff changeset
   133
49e55730eb7a provide "--" argument: tentative release;
wenzelm
parents: 9782
diff changeset
   134
cd "$DISTBASE/$DISTNAME/Doc"
6630
5f810292c030 make pdf;
wenzelm
parents: 6304
diff changeset
   135
PDFLATEX=$(type -path pdflatex)
3169
c13e54126fcd improved doc stuff;
wenzelm
parents: 3099
diff changeset
   136
c13e54126fcd improved doc stuff;
wenzelm
parents: 3099
diff changeset
   137
for DOC in $(cat Contents)
2667
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   138
do
9797
49e55730eb7a provide "--" argument: tentative release;
wenzelm
parents: 9782
diff changeset
   139
  cd "$DOC"
13230
c5fad3c40d45 fail more gracefully, return proper exit codes, allow preset DISTPREFIX
kleing
parents: 13100
diff changeset
   140
  make dvi || fail "DVI document for $DOC failed!"
17554
d16abc8f4fb0 removed "--" argument;
wenzelm
parents: 16508
diff changeset
   141
  { [ -n "$PDFLATEX" ] && make clean pdf; } || fail "PDF document for $DOC failed!"
3169
c13e54126fcd improved doc stuff;
wenzelm
parents: 3099
diff changeset
   142
  cd ..
2667
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   143
done
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   144
9052
7db48fe85b05 provide TAGS file for Isabelle sources;
wenzelm
parents: 8810
diff changeset
   145
9920
9734f2717203 improved WWW page generation (still somewhat experimental);
wenzelm
parents: 9880
diff changeset
   146
# prepare dist dir for release
8059
9128e934bf51 new web pages integrated
kleing
parents: 7993
diff changeset
   147
9920
9734f2717203 improved WWW page generation (still somewhat experimental);
wenzelm
parents: 9880
diff changeset
   148
echo "###"
9734f2717203 improved WWW page generation (still somewhat experimental);
wenzelm
parents: 9880
diff changeset
   149
echo "### Preparing distribution ..."
9734f2717203 improved WWW page generation (still somewhat experimental);
wenzelm
parents: 9880
diff changeset
   150
echo "###"
2667
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   151
17554
d16abc8f4fb0 removed "--" argument;
wenzelm
parents: 16508
diff changeset
   152
cd "$DISTBASE/$DISTNAME" || fail "No dist directory: $DISTBASE/$DISTNAME"
2667
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   153
16301
f9f2e1643593 migrated scripts to new webiste
haftmann
parents: 16286
diff changeset
   154
cp -R Admin/website ..
f9f2e1643593 migrated scripts to new webiste
haftmann
parents: 16286
diff changeset
   155
mkdir -p ../website/conf
f9f2e1643593 migrated scripts to new webiste
haftmann
parents: 16286
diff changeset
   156
cat > ../website/conf/distname.mak <<EOF
17554
d16abc8f4fb0 removed "--" argument;
wenzelm
parents: 16508
diff changeset
   157
# this is a generated file - do not edit!
16301
f9f2e1643593 migrated scripts to new webiste
haftmann
parents: 16286
diff changeset
   158
f9f2e1643593 migrated scripts to new webiste
haftmann
parents: 16286
diff changeset
   159
DISTNAME=$DISTNAME
17554
d16abc8f4fb0 removed "--" argument;
wenzelm
parents: 16508
diff changeset
   160
DISTIDENT=$DISTIDENT
16301
f9f2e1643593 migrated scripts to new webiste
haftmann
parents: 16286
diff changeset
   161
EOF
9920
9734f2717203 improved WWW page generation (still somewhat experimental);
wenzelm
parents: 9880
diff changeset
   162
16481
fe61cdf5af51 exclude pghead.pdf from doc;
wenzelm
parents: 16328
diff changeset
   163
MOVE=$($FIND Doc \( -type f -a -not -type l -a -not -name pghead.pdf -a \( -name \*.dvi -o -name \*.eps -o -name \*.ps -o -name \*.pdf \) -a -print \) | grep -v 'gfx/.*pdf')
6630
5f810292c030 make pdf;
wenzelm
parents: 6304
diff changeset
   164
mv -f $MOVE Distribution/doc
3305
d8114e93ef66 fixed doc;
wenzelm
parents: 3281
diff changeset
   165
rm Distribution/doc/Isa-logics.eps
9052
7db48fe85b05 provide TAGS file for Isabelle sources;
wenzelm
parents: 8810
diff changeset
   166
rm -rf Doc Tools
2667
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   167
7115
37178f53ed4d mkdir contrib;
wenzelm
parents: 6958
diff changeset
   168
mkdir src contrib
2667
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   169
mv $LOGICS src
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   170
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   171
mv Distribution/* .
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   172
rmdir Distribution
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   173
13230
c5fad3c40d45 fail more gracefully, return proper exit codes, allow preset DISTPREFIX
kleing
parents: 13100
diff changeset
   174
( cd lib/browser; make; ) || fail "Graph browser build failed!"
3638
2b67561c6488 Added some commands for building theory browser.
berghofe
parents: 3363
diff changeset
   175
5385
8fc3828fdc8a eps logis;
wenzelm
parents: 5172
diff changeset
   176
cp doc/isabelle*.eps lib/logo
8fc3828fdc8a eps logis;
wenzelm
parents: 5172
diff changeset
   177
3638
2b67561c6488 Added some commands for building theory browser.
berghofe
parents: 3363
diff changeset
   178
2667
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   179
if [ -n "$UNOFFICIAL" ]; then
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   180
  {
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   181
    echo
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   182
    echo "IMPORTANT NOTE"
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   183
    echo "=============="
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   184
    echo
17554
d16abc8f4fb0 removed "--" argument;
wenzelm
parents: 16508
diff changeset
   185
    echo "This is an unofficial release of Isabelle, created by $LOGNAME $DATE."
2667
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   186
    echo
9925
wenzelm
parents: 9920
diff changeset
   187
  } >ANNOUNCE
2667
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   188
fi
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   189
8810
d0eae42f6d12 removed index2;
wenzelm
parents: 8059
diff changeset
   190
perl -pi -e "s/{ISABELLE}/$DISTNAME/g;" lib/html/index.html
17554
d16abc8f4fb0 removed "--" argument;
wenzelm
parents: 16508
diff changeset
   191
perl -pi -e "s/Isabelle repository version/$DISTVERSION/" src/Pure/ROOT.ML lib/Tools/version
4986
d4f257d3445a tuned msgs;
wenzelm
parents: 4982
diff changeset
   192
perl -pi -e "s/the internal repository version of Isabelle/$DISTVERSION/" README.html
3257
4e3724e0659f README generation;
wenzelm
parents: 3186
diff changeset
   193
lynx -dump README.html >README
4e3724e0659f README generation;
wenzelm
parents: 3186
diff changeset
   194
9052
7db48fe85b05 provide TAGS file for Isabelle sources;
wenzelm
parents: 8810
diff changeset
   195
( cd src; ../Admin/maketags; )
10077
wenzelm
parents: 10068
diff changeset
   196
9052
7db48fe85b05 provide TAGS file for Isabelle sources;
wenzelm
parents: 8810
diff changeset
   197
rm -rf Admin
16286
550d113ccd8f find empty dirs up to depth 5;
wenzelm
parents: 16165
diff changeset
   198
rm -f TODO
9052
7db48fe85b05 provide TAGS file for Isabelle sources;
wenzelm
parents: 8810
diff changeset
   199
2667
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   200
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   201
# create archive
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   202
9797
49e55730eb7a provide "--" argument: tentative release;
wenzelm
parents: 9782
diff changeset
   203
echo "###"
49e55730eb7a provide "--" argument: tentative release;
wenzelm
parents: 9782
diff changeset
   204
echo "### Creating archives ..."
49e55730eb7a provide "--" argument: tentative release;
wenzelm
parents: 9782
diff changeset
   205
echo "###"
2667
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   206
9797
49e55730eb7a provide "--" argument: tentative release;
wenzelm
parents: 9782
diff changeset
   207
cd "$DISTBASE"
49e55730eb7a provide "--" argument: tentative release;
wenzelm
parents: 9782
diff changeset
   208
10087
wenzelm
parents: 10077
diff changeset
   209
echo "$DISTBASE/$DISTNAME.tar.gz" > ../ISABELLE_DIST
wenzelm
parents: 10077
diff changeset
   210
10068
46db6fde4ee3 include "Isabelle" link;
wenzelm
parents: 10017
diff changeset
   211
rm -f Isabelle
46db6fde4ee3 include "Isabelle" link;
wenzelm
parents: 10017
diff changeset
   212
ln -s "$DISTNAME" Isabelle
46db6fde4ee3 include "Isabelle" link;
wenzelm
parents: 10017
diff changeset
   213
9797
49e55730eb7a provide "--" argument: tentative release;
wenzelm
parents: 9782
diff changeset
   214
chown -R "$LOGNAME" "$DISTNAME"
49e55730eb7a provide "--" argument: tentative release;
wenzelm
parents: 9782
diff changeset
   215
chmod -R u+w "$DISTNAME"
49e55730eb7a provide "--" argument: tentative release;
wenzelm
parents: 9782
diff changeset
   216
chmod -R g=o "$DISTNAME"
10077
wenzelm
parents: 10068
diff changeset
   217
chgrp -R isabelle "$DISTNAME" Isabelle
2667
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   218
9797
49e55730eb7a provide "--" argument: tentative release;
wenzelm
parents: 9782
diff changeset
   219
mkdir -p "pdf/$DISTNAME/doc"
49e55730eb7a provide "--" argument: tentative release;
wenzelm
parents: 9782
diff changeset
   220
mv "$DISTNAME/doc/"*.pdf "pdf/$DISTNAME/doc"
6748
f1f70344b749 separate archive for pdf docs;
wenzelm
parents: 6630
diff changeset
   221
10096
wenzelm
parents: 10087
diff changeset
   222
echo "$DISTNAME.tar.gz"
10077
wenzelm
parents: 10068
diff changeset
   223
"$TAR" cf "$DISTNAME.tar" Isabelle "$DISTNAME"
10096
wenzelm
parents: 10087
diff changeset
   224
gzip "$DISTNAME.tar"
wenzelm
parents: 10087
diff changeset
   225
wenzelm
parents: 10087
diff changeset
   226
echo "${DISTNAME}_pdf.tar.gz"
10112
wenzelm
parents: 10096
diff changeset
   227
( cd pdf; "$TAR" cf "../${DISTNAME}_pdf.tar" "$DISTNAME"; )
10096
wenzelm
parents: 10087
diff changeset
   228
gzip "${DISTNAME}_pdf.tar"
6748
f1f70344b749 separate archive for pdf docs;
wenzelm
parents: 6630
diff changeset
   229
17606
6527ba893bae removed doc/index.html from distribution (now produced by website);
wenzelm
parents: 17561
diff changeset
   230
mv "pdf/$DISTNAME/doc/"*.pdf "$DISTNAME/doc"
9797
49e55730eb7a provide "--" argument: tentative release;
wenzelm
parents: 9782
diff changeset
   231
rmdir "pdf/$DISTNAME/doc" "pdf/$DISTNAME" pdf
6750
0681dd2211b5 move pdfs back into dist;
wenzelm
parents: 6748
diff changeset
   232
6304
9a82e1c3d9da fixed again;
wenzelm
parents: 6296
diff changeset
   233
9782
63b195acdaaa cleanup dist sources afterwards;
wenzelm
parents: 9052
diff changeset
   234
# cleanup dist
63b195acdaaa cleanup dist sources afterwards;
wenzelm
parents: 9052
diff changeset
   235
9797
49e55730eb7a provide "--" argument: tentative release;
wenzelm
parents: 9782
diff changeset
   236
mv "$DISTNAME" "${DISTNAME}-old"
49e55730eb7a provide "--" argument: tentative release;
wenzelm
parents: 9782
diff changeset
   237
mkdir "$DISTNAME"
9782
63b195acdaaa cleanup dist sources afterwards;
wenzelm
parents: 9052
diff changeset
   238
16328
49c1f9dedc56 added CONTRIBUTORS
haftmann
parents: 16301
diff changeset
   239
mv "${DISTNAME}-old/README.html" "${DISTNAME}-old/INSTALL" "${DISTNAME}-old/NEWS" \
17554
d16abc8f4fb0 removed "--" argument;
wenzelm
parents: 16508
diff changeset
   240
  "${DISTNAME}-old/ANNOUNCE" "${DISTNAME}-old/COPYRIGHT" "${DISTNAME}-old/CONTRIBUTORS" \
d16abc8f4fb0 removed "--" argument;
wenzelm
parents: 16508
diff changeset
   241
  "$DISTNAME"
9797
49e55730eb7a provide "--" argument: tentative release;
wenzelm
parents: 9782
diff changeset
   242
mkdir "$DISTNAME/doc"
17606
6527ba893bae removed doc/index.html from distribution (now produced by website);
wenzelm
parents: 17561
diff changeset
   243
mv "${DISTNAME}-old/doc/"*.pdf "$DISTNAME/doc"
9782
63b195acdaaa cleanup dist sources afterwards;
wenzelm
parents: 9052
diff changeset
   244
9867
wenzelm
parents: 9797
diff changeset
   245
chgrp -R isabelle "$DISTNAME"
wenzelm
parents: 9797
diff changeset
   246
9797
49e55730eb7a provide "--" argument: tentative release;
wenzelm
parents: 9782
diff changeset
   247
rm -rf "${DISTNAME}-old"
9782
63b195acdaaa cleanup dist sources afterwards;
wenzelm
parents: 9052
diff changeset
   248
63b195acdaaa cleanup dist sources afterwards;
wenzelm
parents: 9052
diff changeset
   249
2667
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   250
# final note
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   251
9797
49e55730eb7a provide "--" argument: tentative release;
wenzelm
parents: 9782
diff changeset
   252
echo "###"
10112
wenzelm
parents: 10096
diff changeset
   253
echo "### Finished makedist."
9797
49e55730eb7a provide "--" argument: tentative release;
wenzelm
parents: 9782
diff changeset
   254
echo "###"