Browse Source

Upgrade Ur/Web version, and improve installer script to check that the right version is installed before skipping reinstall

Adam Chlipala 10 years ago
parent
commit
2515abd429
1 changed files with 8 additions and 5 deletions
  1. 8 5
      frameworks/Ur/urweb/install.sh

+ 8 - 5
frameworks/Ur/urweb/install.sh

@@ -1,11 +1,14 @@
 #!/bin/bash
 
-RETCODE=$(fw_exists /usr/local/bin/urweb)
-[ ! "$RETCODE" == 0 ] || { return 0; }
+VERSION=20141206
+COMPILER=/usr/local/bin/urweb
 
-fw_get http://www.impredicative.com/ur/urweb-20140830.tgz
-fw_untar urweb-20140830.tgz
-cd urweb-20140830
+RETCODE=$(fw_exists $COMPILER)
+[ ! "$RETCODE" == 0 ] || [ ! `$COMPILER | grep -oE '[^ ]+$'` == "$VERSION" ] || { return 0; }
+
+fw_get http://www.impredicative.com/ur/urweb-$VERSION.tgz
+fw_untar urweb-$VERSION.tgz
+cd urweb-$VERSION
 ./configure
 make
 sudo make install