19 echo |
19 echo |
20 echo "Usage: Admin/init [OPTIONS]" |
20 echo "Usage: Admin/init [OPTIONS]" |
21 echo |
21 echo |
22 echo " Options are:" |
22 echo " Options are:" |
23 echo " -C force clean working directory (no backup!)" |
23 echo " -C force clean working directory (no backup!)" |
|
24 echo " -L local history only: no pull from repository server" |
24 echo " -R version is current official release" |
25 echo " -R version is current official release" |
25 echo " -U URL Isabelle repository server" |
26 echo " -U URL Isabelle repository server" |
26 echo " (default: \"$ISABELLE_REPOS\")" |
27 echo " (default: \"$ISABELLE_REPOS\")" |
27 echo " -V PATH version from explicit file, or directory that contains" |
28 echo " -V PATH version is taken from file, or directory" |
28 echo " the file \"ISABELLE_VERSION\"" |
29 echo " with file \"ISABELLE_VERSION\"" |
29 echo " -c check clean working directory" |
30 echo " -c check clean working directory" |
30 echo " -f fresh build of Isabelle/Scala/jEdit" |
31 echo " -f fresh build of Isabelle/Scala/jEdit" |
31 echo " -n no build of Isabelle/Scala/jEdit" |
32 echo " -n no build of Isabelle/Scala/jEdit" |
32 echo " -r REV version in Mercurial notation (changeset id or tag)" |
33 echo " -r REV version given in Mercurial notation (changeset id or tag)" |
33 echo " -u version is latest tip from repository server or local clone" |
34 echo " -t version is latest tip" |
34 echo |
35 echo |
35 echo " Initialize the current ISABELLE_HOME directory, which needs to be a" |
36 echo " Initialize the current ISABELLE_HOME directory, which needs to be a" |
36 echo " repository clone (all versions) or repository archive (fixed version)." |
37 echo " repository clone (all versions) or repository archive (fixed version)." |
37 echo " Download required components. Build Isabelle/Scala/jEdit by default." |
38 echo " Download required components. Build Isabelle/Scala/jEdit by default." |
38 echo |
39 echo |
149 |
154 |
150 export LANG=C |
155 export LANG=C |
151 export HGPLAIN= |
156 export HGPLAIN= |
152 |
157 |
153 #Atomic exec: avoid inplace update of running script! |
158 #Atomic exec: avoid inplace update of running script! |
154 export CLEAN_FORCE CLEAN_CHECK REV ISABELLE_REPOS BUILD_OPTIONS |
159 export PULL CLEAN_FORCE CLEAN_CHECK REV ISABELLE_REPOS BUILD_OPTIONS |
155 exec bash -c ' |
160 exec bash -c ' |
156 set -e |
161 set -e |
157 "${HG:-hg}" -R "$ISABELLE_HOME" pull -r "$REV" "$ISABELLE_REPOS" |
162 if [ -n "$PULL" ]; then |
|
163 "${HG:-hg}" -R "$ISABELLE_HOME" pull -r "$REV" "$ISABELLE_REPOS" |
|
164 fi |
158 "${HG:-hg}" -R "$ISABELLE_HOME" update -r "$REV" $CLEAN_FORCE $CLEAN_CHECK |
165 "${HG:-hg}" -R "$ISABELLE_HOME" update -r "$REV" $CLEAN_FORCE $CLEAN_CHECK |
159 "$ISABELLE_HOME/bin/isabelle" components -a |
166 "$ISABELLE_HOME/bin/isabelle" components -a |
160 if [ -n "$BUILD_OPTIONS" ]; then |
167 if [ -n "$BUILD_OPTIONS" ]; then |
161 "$ISABELLE_HOME/bin/isabelle" jedit $BUILD_OPTIONS |
168 "$ISABELLE_HOME/bin/isabelle" jedit $BUILD_OPTIONS |
162 fi |
169 fi |