Admin/makebundle
changeset 37343 c333da19fe67
parent 37315 af2adf0ae97d
child 37357 b7a55231065a
equal deleted inserted replaced
37342:7299d0bf82c5 37343:c333da19fe67
    10 {
    10 {
    11   echo
    11   echo
    12   echo "Usage: $PRG ARCHIVE PLATFORM"
    12   echo "Usage: $PRG ARCHIVE PLATFORM"
    13   echo
    13   echo
    14   echo "  Re-package Isabelle source distribution with add-on components"
    14   echo "  Re-package Isabelle source distribution with add-on components"
    15   echo "  and logic images"
    15   echo "  and heap images"
    16   echo
    16   echo
    17   exit 1
    17   exit 1
    18 }
    18 }
    19 
    19 
    20 function fail()
    20 function fail()
    26 
    26 
    27 ## implicit and explicit arguments
    27 ## implicit and explicit arguments
    28 
    28 
    29 TMP="/var/tmp/isabelle-makebundle$$"
    29 TMP="/var/tmp/isabelle-makebundle$$"
    30 mkdir "$TMP" || fail "Cannot create directory $TMP"
    30 mkdir "$TMP" || fail "Cannot create directory $TMP"
    31 
       
    32 LOGICS="HOL HOL-Nominal HOLCF ZF"
       
    33 
    31 
    34 [ "$#" -ne 2 ] && usage
    32 [ "$#" -ne 2 ] && usage
    35 
    33 
    36 ARCHIVE="$1"; shift
    34 ARCHIVE="$1"; shift
    37 PLATFORM="$1"; shift
    35 PLATFORM="$1"; shift
    63     echo "package $NAME"
    61     echo "package $NAME"
    64   fi
    62   fi
    65 done
    63 done
    66 
    64 
    67 
    65 
    68 for LOGIC in $LOGICS
    66 HEAPS_ARCHIVE="$ARCHIVE_DIR/${ISABELLE_NAME}_heaps_${PLATFORM}.tar.gz"
    69 do
    67 [ -f "$HEAPS_ARCHIVE" ] || fail "Bad heaps archive: $HEAPS_ARCHIVE"
    70   LOGIC_ARCHIVE="$ARCHIVE_DIR/${LOGIC}_${PLATFORM}.tar.gz"
    68 echo "heaps"
    71   [ -f "$LOGIC_ARCHIVE" ] || fail "Bad logic archive: $LOGIC_ARCHIVE"
    69 tar -C "$ISABELLE_HOME" -x -z -f "$HEAPS_ARCHIVE"
    72   echo "logic $LOGIC"
       
    73   tar -C "$ISABELLE_HOME" -x -z -f "$LOGIC_ARCHIVE"
       
    74 done
       
    75 
    70 
    76 
    71 
    77 BUNDLE_ARCHIVE="${ARCHIVE_DIR}/${ISABELLE_NAME}_bundle_${PLATFORM}.tar.gz"
    72 BUNDLE_ARCHIVE="${ARCHIVE_DIR}/${ISABELLE_NAME}_bundle_${PLATFORM}.tar.gz"
    78 
    73 
    79 echo "$(basename "$BUNDLE_ARCHIVE")"
    74 echo "$(basename "$BUNDLE_ARCHIVE")"