Admin/lib/Tools/makedist
changeset 58991 a43898f76ae9
parent 55050 5ff12177a067
child 58994 e7fe592ee089
equal deleted inserted replaced
58990:5f451a141581 58991:a43898f76ae9
    21 {
    21 {
    22   echo
    22   echo
    23   echo "Usage: isabelle $PRG [OPTIONS] [VERSION]"
    23   echo "Usage: isabelle $PRG [OPTIONS] [VERSION]"
    24   echo
    24   echo
    25   echo "  Options are:"
    25   echo "  Options are:"
       
    26   echo "    -O           official release (not release-candidate)"
    26   echo "    -d DIR       global directory prefix (default: \"$DISTPREFIX\")"
    27   echo "    -d DIR       global directory prefix (default: \"$DISTPREFIX\")"
    27   echo "    -j INT       maximum number of parallel jobs (default 1)"
    28   echo "    -j INT       maximum number of parallel jobs (default 1)"
    28   echo "    -r RELEASE   proper release with name"
    29   echo "    -r RELEASE   proper release with name"
    29   echo
    30   echo
    30   echo "  Make Isabelle distribution from the local repository clone."
    31   echo "  Make Isabelle distribution from the local repository clone."
    51 
    52 
    52 ## process command line
    53 ## process command line
    53 
    54 
    54 # options
    55 # options
    55 
    56 
       
    57 OFFICIAL_RELEASE="false"
    56 JOBS=""
    58 JOBS=""
    57 RELEASE=""
    59 RELEASE=""
    58 
    60 
    59 while getopts "d:j:r:" OPT
    61 while getopts "d:j:r:" OPT
    60 do
    62 do
    61   case "$OPT" in
    63   case "$OPT" in
       
    64     O)
       
    65       OFFICIAL_RELEASE="true"
       
    66       ;;
    62     d)
    67     d)
    63       DISTPREFIX="$OPTARG"
    68       DISTPREFIX="$OPTARG"
    64       ;;
    69       ;;
    65     j)
    70     j)
    66       check_number "$OPTARG"
    71       check_number "$OPTARG"
   141     echo "=============="
   146     echo "=============="
   142     echo
   147     echo
   143     echo "This is a snapshot of Isabelle/${IDENT} from the repository."
   148     echo "This is a snapshot of Isabelle/${IDENT} from the repository."
   144     echo
   149     echo
   145   } >ANNOUNCE
   150   } >ANNOUNCE
       
   151 fi
       
   152 
       
   153 if [ -n "$RELEASE" -a "$OFFICIAL_RELEASE" = true ]; then
       
   154   IS_OFFICIAL="true"
   146 else
   155 else
   147   perl -pi -e "s,val is_official = false,val is_official = true,g" src/Pure/ROOT.ML
   156   IS_OFFICIAL="false"
   148 fi
   157 fi
       
   158 
       
   159 perl -pi \
       
   160   -e "s,val is_identified = false,val is_identified = true,g" \
       
   161   -e "s,val is_official = false,val is_official = ${IS_OFFICIAL},g" \
       
   162   src/Pure/ROOT.ML src/Pure/ROOT.scala
   149 
   163 
   150 perl -pi -e "s,ISABELLE_ID=\"\",ISABELLE_ID=\"$IDENT\",g" lib/scripts/getsettings
   164 perl -pi -e "s,ISABELLE_ID=\"\",ISABELLE_ID=\"$IDENT\",g" lib/scripts/getsettings
   151 perl -pi -e "s,ISABELLE_IDENTIFIER=\"\",ISABELLE_IDENTIFIER=\"$DISTNAME\",g" lib/scripts/getsettings
   165 perl -pi -e "s,ISABELLE_IDENTIFIER=\"\",ISABELLE_IDENTIFIER=\"$DISTNAME\",g" lib/scripts/getsettings
   152 perl -pi -e "s,{ISABELLE},$DISTNAME,g" lib/html/library_index_header.template
   166 perl -pi -e "s,{ISABELLE},$DISTNAME,g" lib/html/library_index_header.template
   153 perl -pi -e "s,unidentified repository version,$DISTVERSION,g" src/Pure/ROOT.ML lib/Tools/version
   167 perl -pi -e "s,unidentified repository version,$DISTVERSION,g" src/Pure/ROOT.ML src/Pure/ROOT.scala lib/Tools/version
   154 perl -pi -e "s,some unidentified repository version of Isabelle,$DISTVERSION,g" README
   168 perl -pi -e "s,some unidentified repository version of Isabelle,$DISTVERSION,g" README
   155 
   169 
   156 mkdir -p contrib
   170 mkdir -p contrib
   157 cat >contrib/README <<EOF
   171 cat >contrib/README <<EOF
   158 This directory contains add-on components that contribute to the main
   172 This directory contains add-on components that contribute to the main