merged;
authorwenzelm
Sun, 15 Jul 2012 22:58:52 +0200
changeset 48266 fa7e99b80675
parent 48265 429fab105d99 (diff)
parent 48263 94a7dc2276e4 (current diff)
child 48267 f5676fad35a3
merged;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Admin/component_repository/checksum	Sun Jul 15 22:58:52 2012 +0200
@@ -0,0 +1,70 @@
+#!/usr/bin/env bash
+#
+# Author: Alexander Krauss
+#
+# Computes and validates checksums for the Isabelle component repository
+
+THIS="$(cd $(dirname "$0"); pwd)"
+
+function usage()
+{
+  echo
+  echo "Usage: $0 [OPTIONS] [DIR]"
+  echo
+  echo "  Options are:"
+  echo "    -u           update the recorded checksums in the repository"
+  echo "    -c           compare the actual checksums with the recorded ones"
+  echo
+  echo "  Compute the checksums of components in DIR (default '/home/isabelle/components')"
+  echo "  and synchronize them with the Isabelle repository."
+  echo
+  exit 1
+}
+
+function fail()
+{
+  echo "$1" >&2
+  exit 2
+}
+
+
+## process command line
+
+# options
+
+UPDATE=""
+CHECK=""
+COMPONENTS_DIR="/home/isabelle/components"
+
+while getopts "uc" OPT
+do
+  case "$OPT" in
+    u)
+      UPDATE=true
+      ;;
+    c)
+      CHECK=true
+      ;;
+  esac
+done
+
+shift $(($OPTIND - 1))
+
+[ -n "$UPDATE" ] || [ -n "$CHECK" ] || usage
+
+# args
+
+[ "$#" -ge 1 ] && { COMPONENTS_DIR="$1"; shift; }
+[ "$#" -ne 0 ] && usage
+
+
+## compute checksums
+
+CHECKSUM_FILE="$THIS/components.sha1"
+CHECKSUM_TMP="$THIS/components.sha1.tmp"
+
+cd "$COMPONENTS_DIR"
+sha1sum *.tar.gz > "$CHECKSUM_TMP"
+
+[ -n "$UPDATE" ] && mv "$CHECKSUM_TMP" "$CHECKSUM_FILE"
+[ -n "$CHECK" ] && (diff "$CHECKSUM_FILE" "$CHECKSUM_TMP" || fail "Integrity error")
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Admin/component_repository/components.sha1	Sun Jul 15 22:58:52 2012 +0200
@@ -0,0 +1,10 @@
+2f6417b8e96a0e4e8354fe0f1a253c18fb55d9a7  cvc3-2.4.1.tar.gz
+0fe549949a025d65d52d6deca30554de8fca3b6e  e-1.5.tar.gz
+683acd94761ef460cca1a628f650355370de5afb  hol-light-bundle-0.5-126.tar.gz
+44775a22f42a9d665696bfb49e53c79371c394b0  jedit_build-20111217.tar.gz
+46963db095d6ecdb8c3d174060fdd236971ff6ee  jedit_build-20120414.tar.gz
+6c737137cc597fc920943783382e928ea79e3feb  kodkodi-1.2.16.tar.gz
+43b5afbcad575ab6817d2289756ca22fd2ef43a9  spass-3.8ds.tar.gz
+869ea6d8ea35c8ba68d7fcb028f16b2b7064c5fd  vampire-1.0.tar.gz
+4530a1aa6f4498ee3d78d6000fa71a3f63bd077f  yices-1.0.28.tar.gz
+d94a716502c8503d63952bcb4d4176fac8b28704  z3-4.0.tar.gz
--- a/Admin/components	Sun Jul 15 17:53:47 2012 +0200
+++ b/Admin/components	Sun Jul 15 22:58:52 2012 +0200
@@ -1,5 +1,5 @@
 #contributed components
-contrib/cvc3-2.2
+contrib/cvc3-2.4.1
 contrib/e-1.5
 contrib/hol-light-bundle-0.5-126
 contrib/kodkodi-1.2.16
@@ -7,7 +7,7 @@
 contrib/scala-2.9.2
 contrib/vampire-1.0
 contrib/yices-1.0.28
-contrib/z3-3.2
+contrib/z3-4.0
 contrib/jedit_build-20120414
 contrib/ProofGeneral-4.1
 contrib/jdk-6u31