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 " -R version is current official release" |
24 echo " -R version is current official release" |
25 echo " -U URL Isabelle repository server (default: \"$ISABELLE_REPOS\")" |
25 echo " -U URL Isabelle repository server" |
26 echo " -V PATH version from explicit file or directory (file \"ISABELLE_VERSION\")" |
26 echo " (default: \"$ISABELLE_REPOS\")" |
|
27 echo " -V PATH version from explicit file, or directory that contains" |
|
28 echo " the file \"ISABELLE_VERSION\"" |
27 echo " -c check clean working directory" |
29 echo " -c check clean working directory" |
28 echo " -f fresh build of Isabelle/Scala/jEdit" |
30 echo " -f fresh build of Isabelle/Scala/jEdit" |
29 echo " -n no build of Isabelle/Scala/jEdit" |
31 echo " -n no build of Isabelle/Scala/jEdit" |
30 echo " -r REV version according to Mercurial notation" |
32 echo " -r REV version in Mercurial notation (changeset id or tag)" |
31 echo " -u version is tip (after pull from Isabelle repository server)" |
33 echo " -u version is tip of Isabelle repository server" |
32 echo |
34 echo |
33 echo " Initialize the current ISABELLE_HOME directory, which needs to be a" |
35 echo " Initialize the current ISABELLE_HOME directory, which needs to be a" |
34 echo " repository clone (all versions) or repository archive (fixed version)." |
36 echo " repository clone (all versions) or repository archive (fixed version)." |
35 echo " Download required components and build Isabelle/Scala/jEdit (default)." |
37 echo " Download required components. Build Isabelle/Scala/jEdit by default." |
36 echo |
38 echo |
37 exit 1 |
39 exit 1 |
38 } |
40 } |
39 |
41 |
40 function fail() |
42 function fail() |
121 "$ISABELLE_HOME/bin/isabelle" components -a || exit "?$" |
123 "$ISABELLE_HOME/bin/isabelle" components -a || exit "?$" |
122 if [ -n "$BUILD_OPTIONS" ]; then |
124 if [ -n "$BUILD_OPTIONS" ]; then |
123 "$ISABELLE_HOME/bin/isabelle" jedit $BUILD_OPTIONS |
125 "$ISABELLE_HOME/bin/isabelle" jedit $BUILD_OPTIONS |
124 fi |
126 fi |
125 elif [ ! -d "$ISABELLE_HOME/.hg" ]; then |
127 elif [ ! -d "$ISABELLE_HOME/.hg" ]; then |
126 fail "Not a repository clone: cannot specify version" |
128 fail "Not a repository clone: cannot switch version" |
127 else |
129 else |
128 if [ -n "$VERSION_REV" ]; then |
130 if [ -n "$VERSION_REV" ]; then |
129 REV="$VERSION_REV" |
131 REV="$VERSION_REV" |
130 elif [ -n "$VERSION_RELEASE" ]; then |
132 elif [ -n "$VERSION_RELEASE" ]; then |
131 URL="$ISABELLE_REPOS/raw-file/tip/Admin/Release/official" |
133 URL="$ISABELLE_REPOS/raw-file/tip/Admin/Release/official" |