diff -r eda1d95ef538 -r c259c7a42ac3 Admin/setup --- a/Admin/setup Sun Mar 28 11:45:00 2021 +0200 +++ b/Admin/setup Sun Mar 28 11:59:30 2021 +0200 @@ -25,6 +25,8 @@ echo " -U URL Isabelle repository server (default: \"$ISABELLE_REPOS\")" echo " -V PATH version from explicit file or directory (file \"ISABELLE_VERSION\")" echo " -c check clean working directory" + echo " -f fresh build of Isabelle/Scala/jEdit" + echo " -n no build of Isabelle/Scala/jEdit" echo " -r REV version according to Mercurial notation" echo " -u version is remote tip" echo @@ -45,6 +47,8 @@ #options +BUILD_OPTIONS="-b" + CLEAN_FORCE="" CLEAN_CHECK="" @@ -53,7 +57,7 @@ VERSION_PATH="" VERSION_REV="" -while getopts "CRU:V:cr:u" OPT +while getopts "CRU:V:cfnr:u" OPT do case "$OPT" in C) @@ -77,6 +81,12 @@ c) CLEAN_CHECK="--check" ;; + f) + BUILD_OPTIONS="-b -f" + ;; + n) + BUILD_OPTIONS="" + ;; r) VERSION="true" VERSION_RELEASE="" @@ -106,8 +116,11 @@ ## main if [ -z "$VERSION" ]; then - "$ISABELLE_HOME/bin/isabelle" components -I && \ - "$ISABELLE_HOME/bin/isabelle" components -a + "$ISABELLE_HOME/bin/isabelle" components -I || exit "?$" + "$ISABELLE_HOME/bin/isabelle" components -a || exit "?$" + if [ -n "$BUILD_OPTIONS" ]; then + "$ISABELLE_HOME/bin/isabelle" jedit $BUILD_OPTIONS + fi elif [ ! -d "$ISABELLE_HOME/.hg" ]; then fail "Not a repository clone: cannot specify version" else @@ -135,12 +148,15 @@ "$ISABELLE_HOME/bin/isabelle" components -I || exit "$?" #Atomic exec: avoid inplace update of running script! - export CLEAN REV ISABELLE_REPOS + export CLEAN REV ISABELLE_REPOS BUILD_OPTIONS exec bash -c ' set -e "${HG:-hg}" -R "$ISABELLE_HOME" pull -r "$REV" "$ISABELLE_REPOS" "${HG:-hg}" -R "$ISABELLE_HOME" update -r "$REV" $CLEAN_FORCE $CLEAN_CHECK "$ISABELLE_HOME/bin/isabelle" components -a + if [ -n "$BUILD_OPTIONS" ]; then + "$ISABELLE_HOME/bin/isabelle" jedit $BUILD_OPTIONS + fi "${HG:-hg}" -R "$ISABELLE_HOME" log -r "$REV" if [ ! -f "$ISABELLE_HOME/Admin/setup" ]; then echo >&2 "### The Admin/setup script has disappeared in this version"