support for non-HTTP repository locations (important for mira); quasi-hardwired repository name
authorhaftmann
Wed, 14 Mar 2012 15:24:07 +0100
changeset 46930 6d0a5549e2be
parent 46929 f159e227703a
child 46931 d2b92739038b
support for non-HTTP repository locations (important for mira); quasi-hardwired repository name
Admin/makedist
--- a/Admin/makedist	Wed Mar 14 14:53:48 2012 +0100
+++ b/Admin/makedist	Wed Mar 14 15:24:07 2012 +0100
@@ -4,7 +4,7 @@
 
 ## global settings
 
-REPOS_NAME="${REPOS_NAME:-isabelle}"
+REPOS_NAME="isabelle"
 REPOS="${REPOS:-http://isabelle.in.tum.de/repos/${REPOS_NAME}}"
 DISTPREFIX="${DISTPREFIX:-~/tmp/isadist}"
 
@@ -94,8 +94,14 @@
 echo "### Retrieving Mercurial repository $VERSION"
 echo "###"
 
-{ wget -q "$REPOS/archive/${VERSION}.tar.gz" -O- | tar -xzf -; } || \
-  fail "Failed to retrieve $VERSION"
+if expr match "$REPOS" "https\?://" > /dev/null
+then
+  { wget -q "$REPOS/archive/${VERSION}.tar.gz" -O- | tar -xzf -; } || \
+    fail "Failed to retrieve $VERSION"
+else
+  { hg --repository "$REPOS" archive --type tgz - | tar -xzf -; } || \
+    fail "Failed to retrieve $VERSION"
+fi
 
 IDENT=$(echo * | sed "s/${REPOS_NAME}-//")
 
@@ -224,5 +230,4 @@
 
 rm -rf "${DISTNAME}-old"
 
-
 echo "DONE"