author  wenzelm 
Mon, 26 Sep 2011 23:51:59 +0200  
changeset 45093  26f94c72f306 
parent 45086  3933a0cbd049 
child 45124  d78ec6c10fa1 
permissions  rwxrxrx 
28932
ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

1 
#!/usr/bin/env bash 
ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

2 
# 
ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

3 
# makedist  make Isabelle source distribution 
ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

4 

ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

5 
## global settings 
ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

6 

45086  7 
REPOS_NAME="isabellerelease" 
33909  8 
REPOS="http://isabelle.in.tum.de/repos/${REPOS_NAME}" 
28932
ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

9 

ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

10 
DISTPREFIX=${DISTPREFIX:~/tmp/isadist} 
ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

11 

ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

12 
umask 022 
ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

13 

ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

14 

ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

15 
## diagnostics 
ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

16 

30885  17 
PRG="$(basename "$0")" 
44152  18 
THIS="$(cd $(dirname "$0"); pwd)" 
28932
ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

19 

ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

20 
function usage() 
ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

21 
{ 
ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

22 
cat <<EOF 
ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

23 

ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

24 
Usage: $PRG [OPTIONS] [VERSION] 
ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

25 

ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

26 
Options are: 
43357
07889e32bc58
makedist j: build Isabelle/jEdit via given jedit_build component;
wenzelm
parents:
41984
diff
changeset

27 
j JEDIT_BUILD build Isabelle/jEdit via given jedit_build component 
28932
ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

28 
r RELEASE proper release with name" 
ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

29 

ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

30 
Make Isabelle distribution from the main Mercurial repository at TUM. 
ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

31 

ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

32 
VERSION identifies the snapshot, using usual Mercurial terminology; 
ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

33 
the default is RELEASE if given, otherwise "tip". 
ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

34 

ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

35 
EOF 
ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

36 
exit 1 
ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

37 
} 
ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

38 

ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

39 
function fail() 
ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

40 
{ 
ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

41 
echo "$1" >&2 
ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

42 
exit 2 
ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

43 
} 
ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

44 

ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

45 

ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

46 
## process command line 
ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

47 

ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

48 
# options 
ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

49 

ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

50 
RELEASE="" 
43357
07889e32bc58
makedist j: build Isabelle/jEdit via given jedit_build component;
wenzelm
parents:
41984
diff
changeset

51 
ISABELLE_JEDIT_BUILD_HOME="" 
28932
ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

52 

43357
07889e32bc58
makedist j: build Isabelle/jEdit via given jedit_build component;
wenzelm
parents:
41984
diff
changeset

53 
while getopts "j:r:" OPT 
28932
ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

54 
do 
ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

55 
case "$OPT" in 
43357
07889e32bc58
makedist j: build Isabelle/jEdit via given jedit_build component;
wenzelm
parents:
41984
diff
changeset

56 
j) 
07889e32bc58
makedist j: build Isabelle/jEdit via given jedit_build component;
wenzelm
parents:
41984
diff
changeset

57 
ISABELLE_JEDIT_BUILD_HOME="$OPTARG" 
07889e32bc58
makedist j: build Isabelle/jEdit via given jedit_build component;
wenzelm
parents:
41984
diff
changeset

58 
;; 
28932
ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

59 
r) 
ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

60 
RELEASE="$OPTARG" 
ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

61 
;; 
ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

62 
\?) 
ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

63 
usage 
ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

64 
;; 
ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

65 
esac 
ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

66 
done 
ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

67 

ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

68 
shift $(($OPTIND  1)) 
ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

69 

ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

70 

ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

71 
# args 
ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

72 

ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

73 
VERSION="" 
ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

74 
[ "$#" gt 0 ] && { VERSION="$1"; shift; } 
ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

75 
[ z "$VERSION" ] && VERSION="$RELEASE" 
ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

76 
[ z "$VERSION" ] && VERSION="tip" 
ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

77 

ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

78 
[ "$#" gt 0 ] && usage 
ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

79 

ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

80 

ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

81 
## main 
ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

82 

ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

83 
# tmp 
ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

84 

ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

85 
TMP="tmp$USER$$" 
ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

86 
function purge_tmp () { rm rf "$DISTPREFIX/$TMP"; } 
ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

87 

ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

88 

ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

89 
# retrieve archive and resolve version identifier 
ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

90 

ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

91 
mkdir "$DISTPREFIX/$TMP"  fail "Failed to create fresh directory" 
ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

92 
cd "$DISTPREFIX/$TMP" 
ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

93 

ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

94 
echo "###" 
ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

95 
echo "### Retrieving Mercurial repository $VERSION" 
ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

96 
echo "###" 
ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

97 

ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

98 
{ wget q "$REPOS/archive/${VERSION}.tar.gz" O  tar xzf ; }  \ 
ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

99 
fail "Failed to retrieve $VERSION" 
ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

100 

33910  101 
IDENT=$(echo *  sed "s/${REPOS_NAME}//") 
28932
ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

102 

33909  103 
rm f "${REPOS_NAME}${IDENT}/.hg_archival.txt" 
104 
rm f "${REPOS_NAME}${IDENT}/.hgtags" 

105 
rm f "${REPOS_NAME}${IDENT}/.hgignore" 

106 
rm f "${REPOS_NAME}${IDENT}/README_REPOSITORY" 

28932
ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

107 

ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

108 

ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

109 
# dist name 
ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

110 

ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

111 
DATE=$(env LC_ALL=C date "+%d%b%Y") 
ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

112 
DISTDATE=$(env LC_ALL=C date "+%B %Y") 
ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

113 

ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

114 
if [ z "$RELEASE" ]; then 
ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

115 
DISTNAME="Isabelle_$DATE" 
40573  116 
DISTVERSION="Isabelle repository snapshot $IDENT $DATE" 
28932
ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

117 
else 
ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

118 
DISTNAME="$RELEASE" 
ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

119 
DISTVERSION="$DISTNAME: $DISTDATE" 
ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

120 
fi 
ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

121 

ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

122 
DISTBASE="$DISTPREFIX/dist$DISTNAME" 
ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

123 
mkdir p "$DISTBASE"  { purge_tmp; fail "Unable to create distribution base dir $DISTBASE!"; } 
ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

124 
[ e "$DISTBASE/$DISTNAME" ] && { purge_tmp; fail "$DISTBASE/$DISTNAME already exists!"; } 
ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

125 

ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

126 
cd "$DISTBASE" 
33909  127 
mv "$DISTPREFIX/$TMP/${REPOS_NAME}${IDENT}" "$DISTNAME" 
28932
ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

128 
purge_tmp 
ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

129 

ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

130 
cd "$DISTNAME"  fail "No dist directory: $DISTBASE/$DISTNAME" 
ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

131 

ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

132 

ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

133 
# prepare dist for release 
ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

134 

ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

135 
echo "###" 
ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

136 
echo "### Preparing distribution $DISTNAME" 
ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

137 
echo "###" 
ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

138 

30885  139 
rm f .hgignore 
30287  140 
find . "(" name \*.thy o name \*.ML ")" perm +111 print  xargs chmod f x 
30885  141 
find . print  xargs chmod f u+rw 
28932
ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

142 

ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

143 
./Admin/build all  fail "Failed to build distribution" 
43357
07889e32bc58
makedist j: build Isabelle/jEdit via given jedit_build component;
wenzelm
parents:
41984
diff
changeset

144 

07889e32bc58
makedist j: build Isabelle/jEdit via given jedit_build component;
wenzelm
parents:
41984
diff
changeset

145 
if [ n "$ISABELLE_JEDIT_BUILD_HOME" ]; then 
07889e32bc58
makedist j: build Isabelle/jEdit via given jedit_build component;
wenzelm
parents:
41984
diff
changeset

146 
[ d "$ISABELLE_JEDIT_BUILD_HOME" ]  fail "Bad jedit_build component directory: \"$ISABELLE_JEDIT_BUILD_HOME\"" 
07889e32bc58
makedist j: build Isabelle/jEdit via given jedit_build component;
wenzelm
parents:
41984
diff
changeset

147 
eval "$(fgrep ISABELLE_JEDIT_BUILD_VERSION "$ISABELLE_JEDIT_BUILD_HOME/etc/settings")" 
07889e32bc58
makedist j: build Isabelle/jEdit via given jedit_build component;
wenzelm
parents:
41984
diff
changeset

148 
[ n "$ISABELLE_JEDIT_BUILD_VERSION" ]  fail "Bad ISABELLE_JEDIT_BUILD_VERSION" 
07889e32bc58
makedist j: build Isabelle/jEdit via given jedit_build component;
wenzelm
parents:
41984
diff
changeset

149 
export ISABELLE_JEDIT_BUILD_HOME ISABELLE_JEDIT_BUILD_VERSION 
07889e32bc58
makedist j: build Isabelle/jEdit via given jedit_build component;
wenzelm
parents:
41984
diff
changeset

150 
./bin/isabelle jedit b  fail "Failed to build Isabelle/jEdit" 
07889e32bc58
makedist j: build Isabelle/jEdit via given jedit_build component;
wenzelm
parents:
41984
diff
changeset

151 
fi 
07889e32bc58
makedist j: build Isabelle/jEdit via given jedit_build component;
wenzelm
parents:
41984
diff
changeset

152 

28932
ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

153 
rm rf Admin 
ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

154 

ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

155 
MOVE=$(find docsrc \( 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') 
ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

156 
mv f $MOVE doc 
ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

157 
rm doc/Isalogics.eps 
31842
af5221147455
discontinued separate "pdf" archive  since it is now relatively small compared to the main archive, there is no point to fragment things;
wenzelm
parents:
30885
diff
changeset

158 
rm doc/adaptation.dvi doc/adaptation.pdf doc/architecture.dvi doc/architecture.pdf 
28932
ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

159 
rm rf docsrc 
ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

160 

30140  161 
mkdir p contrib 
37369  162 
cat >contrib/README <<EOF 
163 
This directory contains addon components that contribute to the main 

164 
Isabelle distribution. Separate licensing conditions apply, see each 

165 
directory individually. 

166 
EOF 

28932
ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

167 

ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

168 
cp doc/isabelle*.eps lib/logo 
ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

169 

ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

170 
if [ z "$RELEASE" ]; then 
ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

171 
{ 
ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

172 
echo 
ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

173 
echo "IMPORTANT NOTE" 
ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

174 
echo "==============" 
ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

175 
echo 
ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

176 
echo "This is an unofficial snapshot of Isabelle, created by $LOGNAME $DATE." 
ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

177 
echo "See $REPOS/log/$IDENT for details." 
ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

178 
echo 
ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

179 
} >ANNOUNCE 
ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

180 
else 
ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

181 
perl pi e "s,val is_official = false,val is_official = true,g" src/Pure/ROOT.ML 
ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

182 
fi 
ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

183 

ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

184 
perl pi e "s,val changelog = \"\",val changelog = \"$REPOS/log/$IDENT\",g" src/Pure/ROOT.ML 
41511  185 
perl pi e "s,ISABELLE_ID=\"\",ISABELLE_ID=\"$IDENT\",g" lib/scripts/getsettings 
28932
ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

186 
perl pi e "s,ISABELLE_IDENTIFIER=\"\",ISABELLE_IDENTIFIER=\"$DISTNAME\",g" lib/scripts/getsettings 
ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

187 
perl pi e "s,{ISABELLE},$DISTNAME,g" lib/html/library_index_header.template 
32361
141e5151b918
clarified situation about unidentified repository versions  in a distributed setting there is not "the" repository;
wenzelm
parents:
31842
diff
changeset

188 
perl pi e "s,unidentified repository version,$DISTVERSION,g" src/Pure/ROOT.ML lib/Tools/version 
141e5151b918
clarified situation about unidentified repository versions  in a distributed setting there is not "the" repository;
wenzelm
parents:
31842
diff
changeset

189 
perl pi e "s,some unidentified repository version of Isabelle,$DISTVERSION,g" README 
28932
ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

190 

ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

191 

37341  192 
# create archive 
28932
ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

193 

ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

194 
echo "###" 
37341  195 
echo "### Creating archive ..." 
28932
ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

196 
echo "###" 
ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

197 

ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

198 
cd "$DISTBASE" 
ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

199 

ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

200 
echo "$DISTBASE/$DISTNAME.tar.gz" > ../ISABELLE_DIST 
ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

201 
echo "$IDENT" >../ISABELLE_IDENT 
ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

202 

ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

203 
chown R "$LOGNAME" "$DISTNAME" 
ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

204 
chmod R u+w "$DISTNAME" 
ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

205 
chmod R g=o "$DISTNAME" 
40713
7f745e4b7cce
discontinued global "Isabelle" symlink, to make each distribution even more selfcontained;
wenzelm
parents:
40573
diff
changeset

206 
chgrp R isabelle "$DISTNAME" 
28932
ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

207 

ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

208 
echo "$DISTNAME.tar.gz" 
40713
7f745e4b7cce
discontinued global "Isabelle" symlink, to make each distribution even more selfcontained;
wenzelm
parents:
40573
diff
changeset

209 
tar czf "$DISTNAME.tar.gz" "$DISTNAME" 
28932
ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

210 

ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

211 

ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

212 
# cleanup dist 
ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

213 

ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

214 
mv "$DISTNAME" "${DISTNAME}old" 
ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

215 
mkdir "$DISTNAME" 
ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

216 

37368  217 
mv "${DISTNAME}old/README" "${DISTNAME}old/NEWS" "${DISTNAME}old/ANNOUNCE" \ 
218 
"${DISTNAME}old/COPYRIGHT" "${DISTNAME}old/CONTRIBUTORS" "$DISTNAME" 

28932
ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

219 
mkdir "$DISTNAME/doc" 
ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

220 
mv "${DISTNAME}old/doc/"*.pdf "${DISTNAME}old/doc/Contents" "$DISTNAME/doc" 
ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

221 

41984
e5dba3d75e9e
recover Isabelle symlink for public distribution, notably website;
wenzelm
parents:
41665
diff
changeset

222 
rm f Isabelle && ln sf "$DISTNAME" Isabelle 
e5dba3d75e9e
recover Isabelle symlink for public distribution, notably website;
wenzelm
parents:
41665
diff
changeset

223 

28932
ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

224 
chgrp R isabelle "$DISTNAME" 
ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

225 

ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

226 
rm rf "${DISTNAME}old" 
ccaa3355f7d3
makedist  make Isabelle source distribution (Mercurial version);
wenzelm
parents:
diff
changeset

227 

37341  228 

229 
echo "DONE" 