瀏覽代碼

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

Adam Chlipala 11 年之前
父節點
當前提交
2515abd429
共有 1 個文件被更改,包括 8 次插入5 次删除
  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