lwan.sh 660 B

12345678910111213141516171819202122232425
  1. #!/bin/bash
  2. RETCODE=$(fw_exists ${IROOT}/lwan.installed)
  3. [ ! "$RETCODE" == 0 ] || { \
  4. source $IROOT/lwan.installed
  5. return 0; }
  6. REV='49607addb31879e2aa2b701317773674662315aa'
  7. LWAN_HOME=$IROOT/lwan
  8. [ ! -e $IROOT/lwan.installed -a -d $LWAN_HOME ] && rm -rf $LWAN_HOME
  9. # Lwan is only built during installation as a dependency sanity check.
  10. git clone git://github.com/lpereira/lwan.git
  11. cd $LWAN_HOME
  12. git checkout ${REV}
  13. mkdir build
  14. cd build
  15. cmake .. -DCMAKE_BUILD_TYPE=Release
  16. make techempower
  17. echo "export LWAN_ROOT=${LWAN_HOME}" > $IROOT/lwan.installed
  18. echo -e "export LWAN_BUILD=\$LWAN_ROOT/build" >> $IROOT/lwan.installed
  19. source $IROOT/lwan.installed