Admin/makedist
author wenzelm
Sun, 30 Nov 2008 14:43:29 +0100
changeset 28917 20f43e0e0958
parent 27647 ee452b218407
child 28942 043a42ba2a4d
permissions -rwxr-xr-x
tuned;
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}
23149
ddc5800b699f added src/Tools;
wenzelm
parents: 21712
diff changeset
    11
SRCS="CCL CTT Cube FOL FOLP HOL HOLCF LCF Provers Pure Sequents Tools ZF"
2667
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    12
26372
f882403f0d56 replaced obsolete /usr/proj by /home;
wenzelm
parents: 26370
diff changeset
    13
export CVSROOT=/home/isabelle-repository/archive
26370
2a4f0d0621f1 remote CVSROOT: default to atbroy100 instead of sunbroy2;
wenzelm
parents: 26133
diff changeset
    14
[ ! -d "$CVSROOT" ] && CVSROOT="${ISABELLE_USER:-$USER}@atbroy100.informatik.tu-muenchen.de:$CVSROOT"
2667
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    15
27633
c2984f0684ee assume GNU tar and find;
wenzelm
parents: 27446
diff changeset
    16
[ -z "$CVS2CL" ] && type -path cvs2cl >/dev/null && CVS2CL=cvs2cl
9920
9734f2717203 improved WWW page generation (still somewhat experimental);
wenzelm
parents: 9880
diff changeset
    17
27633
c2984f0684ee assume GNU tar and find;
wenzelm
parents: 27446
diff changeset
    18
umask 022
26370
2a4f0d0621f1 remote CVSROOT: default to atbroy100 instead of sunbroy2;
wenzelm
parents: 26133
diff changeset
    19
2667
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    20
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    21
## diagnostics
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    22
9797
49e55730eb7a provide "--" argument: tentative release;
wenzelm
parents: 9782
diff changeset
    23
PRG=$(basename "$0")
49e55730eb7a provide "--" argument: tentative release;
wenzelm
parents: 9782
diff changeset
    24
THIS=$(cd $(dirname "$0"); echo "$PWD")
2667
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    25
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    26
function usage()
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    27
{
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    28
  cat <<EOF
11062
wenzelm
parents: 10928
diff changeset
    29
17554
d16abc8f4fb0 removed "--" argument;
wenzelm
parents: 16508
diff changeset
    30
Usage: $PRG VERSION [NAME]
11062
wenzelm
parents: 10928
diff changeset
    31
2667
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    32
  Make Isabelle distribution from the master sources at TUM.
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    33
17693
541f6367a431 avoid naming existing tags in explanations;
wenzelm
parents: 17655
diff changeset
    34
  VERSION may be either a tag like "IsabelleXXXX" that specifies the
2667
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    35
  release to be exported from the repository, or "-" to checkout the
17554
d16abc8f4fb0 removed "--" argument;
wenzelm
parents: 16508
diff changeset
    36
  current sources as an unofficial release.
d16abc8f4fb0 removed "--" argument;
wenzelm
parents: 16508
diff changeset
    37
d16abc8f4fb0 removed "--" argument;
wenzelm
parents: 16508
diff changeset
    38
  NAME specifies an explicit distribution name, by default it is
d16abc8f4fb0 removed "--" argument;
wenzelm
parents: 16508
diff changeset
    39
  derived from VERSION.
27638
ef8a96456b3c tuned whitespace;
wenzelm
parents: 27637
diff changeset
    40
2667
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    41
EOF
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    42
  exit 1
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    43
}
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    44
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    45
function fail()
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    46
{
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    47
  echo "$1" >&2
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    48
  exit 2
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    49
}
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    50
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    51
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    52
## process command line
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    53
17554
d16abc8f4fb0 removed "--" argument;
wenzelm
parents: 16508
diff changeset
    54
[ "$#" -ne 1 -a "$#" -ne 2 ] && usage
d16abc8f4fb0 removed "--" argument;
wenzelm
parents: 16508
diff changeset
    55
d16abc8f4fb0 removed "--" argument;
wenzelm
parents: 16508
diff changeset
    56
VERSION="$1"; shift
2667
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    57
17554
d16abc8f4fb0 removed "--" argument;
wenzelm
parents: 16508
diff changeset
    58
if [ "$#" -eq 0 ]; then
d16abc8f4fb0 removed "--" argument;
wenzelm
parents: 16508
diff changeset
    59
  DISTNAME=""
d16abc8f4fb0 removed "--" argument;
wenzelm
parents: 16508
diff changeset
    60
else
d16abc8f4fb0 removed "--" argument;
wenzelm
parents: 16508
diff changeset
    61
  DISTNAME="$1"; shift
d16abc8f4fb0 removed "--" argument;
wenzelm
parents: 16508
diff changeset
    62
fi
2667
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
## main
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    66
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    67
# dist version
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    68
21712
8b2fd895a7fc date: forcing LC_ALL=C prevents funny file names;
wenzelm
parents: 20990
diff changeset
    69
DATE=$(env LC_ALL=C date "+%d-%b-%Y")
8b2fd895a7fc date: forcing LC_ALL=C prevents funny file names;
wenzelm
parents: 20990
diff changeset
    70
DISTDATE=$(env LC_ALL=C date "+%B %Y")
2667
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    71
17554
d16abc8f4fb0 removed "--" argument;
wenzelm
parents: 16508
diff changeset
    72
if [ "$VERSION" = "-" ]; then
d16abc8f4fb0 removed "--" argument;
wenzelm
parents: 16508
diff changeset
    73
  DISTIDENT="Isabelle_$DATE"
d16abc8f4fb0 removed "--" argument;
wenzelm
parents: 16508
diff changeset
    74
  [ -z "$DISTNAME" ] && DISTNAME="$DISTIDENT"
9797
49e55730eb7a provide "--" argument: tentative release;
wenzelm
parents: 9782
diff changeset
    75
  DISTVERSION="$DISTNAME"
49e55730eb7a provide "--" argument: tentative release;
wenzelm
parents: 9782
diff changeset
    76
  EXPORT="cvs -f -q checkout -P -d $DISTNAME isabelle"
17558
wenzelm
parents: 17554
diff changeset
    77
  UNOFFICIAL=true
2667
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    78
else
17554
d16abc8f4fb0 removed "--" argument;
wenzelm
parents: 16508
diff changeset
    79
  DISTIDENT="$VERSION"
d16abc8f4fb0 removed "--" argument;
wenzelm
parents: 16508
diff changeset
    80
  [ -z "$DISTNAME" ] && DISTNAME="$DISTIDENT"
4982
6f96354267e0 tuned dist version;
wenzelm
parents: 4979
diff changeset
    81
  DISTVERSION="$DISTNAME: $DISTDATE"
17561
bde06ed41123 fixed cvs export;
wenzelm
parents: 17560
diff changeset
    82
  EXPORT="cvs -f -q export -r $VERSION -d $DISTNAME isabelle"
2667
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    83
  UNOFFICIAL=""
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    84
fi
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    85
9797
49e55730eb7a provide "--" argument: tentative release;
wenzelm
parents: 9782
diff changeset
    86
DISTBASE="$DISTPREFIX/dist-$DISTNAME"
49e55730eb7a provide "--" argument: tentative release;
wenzelm
parents: 9782
diff changeset
    87
mkdir -p "$DISTBASE" || fail "Unable to create distribution base dir $DISTBASE!"
49e55730eb7a provide "--" argument: tentative release;
wenzelm
parents: 9782
diff changeset
    88
[ -e "$DISTBASE/$DISTNAME" ] && fail "$DISTBASE/$DISTNAME already exists!"
49e55730eb7a provide "--" argument: tentative release;
wenzelm
parents: 9782
diff changeset
    89
[ -e "$DISTBASE/pdf/$DISTNAME" ] && fail "$DISTBASE/pdf/$DISTNAME already exists!"
2667
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    90
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    91
9797
49e55730eb7a provide "--" argument: tentative release;
wenzelm
parents: 9782
diff changeset
    92
# export repository
2667
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    93
9797
49e55730eb7a provide "--" argument: tentative release;
wenzelm
parents: 9782
diff changeset
    94
echo "###"
17554
d16abc8f4fb0 removed "--" argument;
wenzelm
parents: 16508
diff changeset
    95
echo "### Exporting $DISTIDENT ..."
9797
49e55730eb7a provide "--" argument: tentative release;
wenzelm
parents: 9782
diff changeset
    96
echo "###"
2667
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    97
9797
49e55730eb7a provide "--" argument: tentative release;
wenzelm
parents: 9782
diff changeset
    98
cd "$DISTBASE"
2667
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    99
13230
c5fad3c40d45 fail more gracefully, return proper exit codes, allow preset DISTPREFIX
kleing
parents: 13100
diff changeset
   100
$EXPORT || fail "Export failed!"
15438
dfc7d2a824d6 Added ChangeLog
berghofe
parents: 13803
diff changeset
   101
27029
0006d6a6d21d cvs2cl only for unofficial releases;
wenzelm
parents: 26372
diff changeset
   102
if [ -n "$CVS2CL" -a -n "$UNOFFICIAL" ]; then
15438
dfc7d2a824d6 Added ChangeLog
berghofe
parents: 13803
diff changeset
   103
  cd $DISTNAME
dfc7d2a824d6 Added ChangeLog
berghofe
parents: 13803
diff changeset
   104
  $CVS2CL
dfc7d2a824d6 Added ChangeLog
berghofe
parents: 13803
diff changeset
   105
  gzip ChangeLog
26108
46f4e4cd3b69 keep ChangeLog.gz within distribution;
wenzelm
parents: 25949
diff changeset
   106
  cp ChangeLog.gz ..
15438
dfc7d2a824d6 Added ChangeLog
berghofe
parents: 13803
diff changeset
   107
  cd ..
dfc7d2a824d6 Added ChangeLog
berghofe
parents: 13803
diff changeset
   108
fi
dfc7d2a824d6 Added ChangeLog
berghofe
parents: 13803
diff changeset
   109
27633
c2984f0684ee assume GNU tar and find;
wenzelm
parents: 27446
diff changeset
   110
find . -name CVS -print | xargs rm -rf
c2984f0684ee assume GNU tar and find;
wenzelm
parents: 27446
diff changeset
   111
find . -name .cvsignore -print | xargs rm -rf
c2984f0684ee assume GNU tar and find;
wenzelm
parents: 27446
diff changeset
   112
find . "(" -name \*.thy -o -name \*.ML ")" -perm +111 -print | xargs chmod -x
c2984f0684ee assume GNU tar and find;
wenzelm
parents: 27446
diff changeset
   113
find . -print | xargs chmod u+rw
2667
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   114
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   115
27633
c2984f0684ee assume GNU tar and find;
wenzelm
parents: 27446
diff changeset
   116
# build components
9797
49e55730eb7a provide "--" argument: tentative release;
wenzelm
parents: 9782
diff changeset
   117
27633
c2984f0684ee assume GNU tar and find;
wenzelm
parents: 27446
diff changeset
   118
"$DISTBASE/$DISTNAME/Admin/build" all || fail "Failed to build distribution"
2667
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   119
9052
7db48fe85b05 provide TAGS file for Isabelle sources;
wenzelm
parents: 8810
diff changeset
   120
9920
9734f2717203 improved WWW page generation (still somewhat experimental);
wenzelm
parents: 9880
diff changeset
   121
# prepare dist dir for release
8059
9128e934bf51 new web pages integrated
kleing
parents: 7993
diff changeset
   122
9920
9734f2717203 improved WWW page generation (still somewhat experimental);
wenzelm
parents: 9880
diff changeset
   123
echo "###"
9734f2717203 improved WWW page generation (still somewhat experimental);
wenzelm
parents: 9880
diff changeset
   124
echo "### Preparing distribution ..."
9734f2717203 improved WWW page generation (still somewhat experimental);
wenzelm
parents: 9880
diff changeset
   125
echo "###"
2667
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   126
17554
d16abc8f4fb0 removed "--" argument;
wenzelm
parents: 16508
diff changeset
   127
cd "$DISTBASE/$DISTNAME" || fail "No dist directory: $DISTBASE/$DISTNAME"
2667
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   128
25237
5dbb6d583adc improved website integration
haftmann
parents: 25235
diff changeset
   129
mkdir -p ../website
5dbb6d583adc improved website integration
haftmann
parents: 25235
diff changeset
   130
cat > ../website/distinfo.mak <<EOF
17942
68988fd2fd27 towards an improved website/makedist integration
haftmann
parents: 17910
diff changeset
   131
# this is a generated file - do not edit unless you know what you are doing!
16301
f9f2e1643593 migrated scripts to new webiste
haftmann
parents: 16286
diff changeset
   132
f9f2e1643593 migrated scripts to new webiste
haftmann
parents: 16286
diff changeset
   133
DISTNAME=$DISTNAME
17554
d16abc8f4fb0 removed "--" argument;
wenzelm
parents: 16508
diff changeset
   134
DISTIDENT=$DISTIDENT
17910
2b435795c9e9 slight improvements for website
haftmann
parents: 17693
diff changeset
   135
DISTBASE=$DISTBASE
16301
f9f2e1643593 migrated scripts to new webiste
haftmann
parents: 16286
diff changeset
   136
EOF
9920
9734f2717203 improved WWW page generation (still somewhat experimental);
wenzelm
parents: 9880
diff changeset
   137
25237
5dbb6d583adc improved website integration
haftmann
parents: 25235
diff changeset
   138
cp Distribution/lib/html/library_index_content.template ../website/
5dbb6d583adc improved website integration
haftmann
parents: 25235
diff changeset
   139
27633
c2984f0684ee assume GNU tar and find;
wenzelm
parents: 27446
diff changeset
   140
MOVE=$(find Doc \( -type f -a -not -type l -a -not -name isabelle_isar.pdf -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
   141
mv -f $MOVE Distribution/doc
3305
d8114e93ef66 fixed doc;
wenzelm
parents: 3281
diff changeset
   142
rm Distribution/doc/Isa-logics.eps
27090
2f45c1b1b05d remove codegen_process.pdf from distribution;
wenzelm
parents: 27029
diff changeset
   143
rm Distribution/doc/codegen_process.pdf
23201
85612df29daa proper handling of Tools;
wenzelm
parents: 23160
diff changeset
   144
rm -rf Doc
2667
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   145
7115
37178f53ed4d mkdir contrib;
wenzelm
parents: 6958
diff changeset
   146
mkdir src contrib
23149
ddc5800b699f added src/Tools;
wenzelm
parents: 21712
diff changeset
   147
mv $SRCS src
2667
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   148
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   149
mv Distribution/* .
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   150
rmdir Distribution
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   151
25949
850b4c2d0f17 reactivated mk of java/scala sources, with paranoia PATH setting for sunbroy;
wenzelm
parents: 25859
diff changeset
   152
5385
8fc3828fdc8a eps logis;
wenzelm
parents: 5172
diff changeset
   153
cp doc/isabelle*.eps lib/logo
8fc3828fdc8a eps logis;
wenzelm
parents: 5172
diff changeset
   154
3638
2b67561c6488 Added some commands for building theory browser.
berghofe
parents: 3363
diff changeset
   155
2667
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   156
if [ -n "$UNOFFICIAL" ]; then
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   157
  {
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   158
    echo
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   159
    echo "IMPORTANT NOTE"
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   160
    echo "=============="
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   161
    echo
27647
ee452b218407 tuned message;
wenzelm
parents: 27640
diff changeset
   162
    echo "This is an unofficial snapshot of Isabelle, created by $LOGNAME $DATE."
2667
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   163
    echo
9925
wenzelm
parents: 9920
diff changeset
   164
  } >ANNOUNCE
27640
9df10b28aa60 structure Distribution: swapped default for is_official;
wenzelm
parents: 27638
diff changeset
   165
else
9df10b28aa60 structure Distribution: swapped default for is_official;
wenzelm
parents: 27638
diff changeset
   166
  perl -pi -e "s/val is_official = false/val is_official = true/" src/Pure/ROOT.ML
2667
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   167
fi
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   168
25433
d138fd74a1a1 cover ISABELLE_IDENTIFIER;
wenzelm
parents: 25237
diff changeset
   169
perl -pi -e "s/ISABELLE_IDENTIFIER=\"\"/ISABELLE_IDENTIFIER=\"$DISTNAME\"/g;" lib/scripts/getsettings
25237
5dbb6d583adc improved website integration
haftmann
parents: 25235
diff changeset
   170
perl -pi -e "s/{ISABELLE}/$DISTNAME/g;" lib/html/library_index_header.template
17554
d16abc8f4fb0 removed "--" argument;
wenzelm
parents: 16508
diff changeset
   171
perl -pi -e "s/Isabelle repository version/$DISTVERSION/" src/Pure/ROOT.ML lib/Tools/version
25214
91730b492a45 ASCIIfied README
haftmann
parents: 23895
diff changeset
   172
perl -pi -e "s/the internal repository version of Isabelle/$DISTVERSION/" README
3257
4e3724e0659f README generation;
wenzelm
parents: 3186
diff changeset
   173
10077
wenzelm
parents: 10068
diff changeset
   174
9052
7db48fe85b05 provide TAGS file for Isabelle sources;
wenzelm
parents: 8810
diff changeset
   175
rm -rf Admin
7db48fe85b05 provide TAGS file for Isabelle sources;
wenzelm
parents: 8810
diff changeset
   176
2667
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   177
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   178
# create archive
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   179
9797
49e55730eb7a provide "--" argument: tentative release;
wenzelm
parents: 9782
diff changeset
   180
echo "###"
49e55730eb7a provide "--" argument: tentative release;
wenzelm
parents: 9782
diff changeset
   181
echo "### Creating archives ..."
49e55730eb7a provide "--" argument: tentative release;
wenzelm
parents: 9782
diff changeset
   182
echo "###"
2667
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   183
9797
49e55730eb7a provide "--" argument: tentative release;
wenzelm
parents: 9782
diff changeset
   184
cd "$DISTBASE"
49e55730eb7a provide "--" argument: tentative release;
wenzelm
parents: 9782
diff changeset
   185
10087
wenzelm
parents: 10077
diff changeset
   186
echo "$DISTBASE/$DISTNAME.tar.gz" > ../ISABELLE_DIST
wenzelm
parents: 10077
diff changeset
   187
10068
46db6fde4ee3 include "Isabelle" link;
wenzelm
parents: 10017
diff changeset
   188
rm -f Isabelle
46db6fde4ee3 include "Isabelle" link;
wenzelm
parents: 10017
diff changeset
   189
ln -s "$DISTNAME" Isabelle
46db6fde4ee3 include "Isabelle" link;
wenzelm
parents: 10017
diff changeset
   190
9797
49e55730eb7a provide "--" argument: tentative release;
wenzelm
parents: 9782
diff changeset
   191
chown -R "$LOGNAME" "$DISTNAME"
49e55730eb7a provide "--" argument: tentative release;
wenzelm
parents: 9782
diff changeset
   192
chmod -R u+w "$DISTNAME"
49e55730eb7a provide "--" argument: tentative release;
wenzelm
parents: 9782
diff changeset
   193
chmod -R g=o "$DISTNAME"
10077
wenzelm
parents: 10068
diff changeset
   194
chgrp -R isabelle "$DISTNAME" Isabelle
2667
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   195
9797
49e55730eb7a provide "--" argument: tentative release;
wenzelm
parents: 9782
diff changeset
   196
mkdir -p "pdf/$DISTNAME/doc"
17655
0039abe88816 yet another atempt to get doc/Contents right;
wenzelm
parents: 17653
diff changeset
   197
mv "$DISTNAME/doc/"*.pdf "pdf/$DISTNAME/doc"
0039abe88816 yet another atempt to get doc/Contents right;
wenzelm
parents: 17653
diff changeset
   198
10096
wenzelm
parents: 10087
diff changeset
   199
echo "$DISTNAME.tar.gz"
27633
c2984f0684ee assume GNU tar and find;
wenzelm
parents: 27446
diff changeset
   200
tar cf "$DISTNAME.tar" Isabelle "$DISTNAME"
10096
wenzelm
parents: 10087
diff changeset
   201
gzip "$DISTNAME.tar"
wenzelm
parents: 10087
diff changeset
   202
wenzelm
parents: 10087
diff changeset
   203
echo "${DISTNAME}_pdf.tar.gz"
27633
c2984f0684ee assume GNU tar and find;
wenzelm
parents: 27446
diff changeset
   204
( cd pdf; tar cf "../${DISTNAME}_pdf.tar" "$DISTNAME"; )
10096
wenzelm
parents: 10087
diff changeset
   205
gzip "${DISTNAME}_pdf.tar"
6748
f1f70344b749 separate archive for pdf docs;
wenzelm
parents: 6630
diff changeset
   206
17655
0039abe88816 yet another atempt to get doc/Contents right;
wenzelm
parents: 17653
diff changeset
   207
mv "pdf/$DISTNAME/doc/"*.pdf "$DISTNAME/doc"
9797
49e55730eb7a provide "--" argument: tentative release;
wenzelm
parents: 9782
diff changeset
   208
rmdir "pdf/$DISTNAME/doc" "pdf/$DISTNAME" pdf
6750
0681dd2211b5 move pdfs back into dist;
wenzelm
parents: 6748
diff changeset
   209
6304
9a82e1c3d9da fixed again;
wenzelm
parents: 6296
diff changeset
   210
9782
63b195acdaaa cleanup dist sources afterwards;
wenzelm
parents: 9052
diff changeset
   211
# cleanup dist
63b195acdaaa cleanup dist sources afterwards;
wenzelm
parents: 9052
diff changeset
   212
9797
49e55730eb7a provide "--" argument: tentative release;
wenzelm
parents: 9782
diff changeset
   213
mv "$DISTNAME" "${DISTNAME}-old"
49e55730eb7a provide "--" argument: tentative release;
wenzelm
parents: 9782
diff changeset
   214
mkdir "$DISTNAME"
9782
63b195acdaaa cleanup dist sources afterwards;
wenzelm
parents: 9052
diff changeset
   215
25214
91730b492a45 ASCIIfied README
haftmann
parents: 23895
diff changeset
   216
mv "${DISTNAME}-old/README" "${DISTNAME}-old/INSTALL" "${DISTNAME}-old/NEWS" \
17554
d16abc8f4fb0 removed "--" argument;
wenzelm
parents: 16508
diff changeset
   217
  "${DISTNAME}-old/ANNOUNCE" "${DISTNAME}-old/COPYRIGHT" "${DISTNAME}-old/CONTRIBUTORS" \
d16abc8f4fb0 removed "--" argument;
wenzelm
parents: 16508
diff changeset
   218
  "$DISTNAME"
9797
49e55730eb7a provide "--" argument: tentative release;
wenzelm
parents: 9782
diff changeset
   219
mkdir "$DISTNAME/doc"
17655
0039abe88816 yet another atempt to get doc/Contents right;
wenzelm
parents: 17653
diff changeset
   220
mv "${DISTNAME}-old/doc/"*.pdf "${DISTNAME}-old/doc/Contents" "$DISTNAME/doc"
9782
63b195acdaaa cleanup dist sources afterwards;
wenzelm
parents: 9052
diff changeset
   221
9867
wenzelm
parents: 9797
diff changeset
   222
chgrp -R isabelle "$DISTNAME"
wenzelm
parents: 9797
diff changeset
   223
9797
49e55730eb7a provide "--" argument: tentative release;
wenzelm
parents: 9782
diff changeset
   224
rm -rf "${DISTNAME}-old"
9782
63b195acdaaa cleanup dist sources afterwards;
wenzelm
parents: 9052
diff changeset
   225
63b195acdaaa cleanup dist sources afterwards;
wenzelm
parents: 9052
diff changeset
   226
9797
49e55730eb7a provide "--" argument: tentative release;
wenzelm
parents: 9782
diff changeset
   227
echo "###"
10112
wenzelm
parents: 10096
diff changeset
   228
echo "### Finished makedist."
9797
49e55730eb7a provide "--" argument: tentative release;
wenzelm
parents: 9782
diff changeset
   229
echo "###"