lwan.sh 703 B

1234567891011121314151617181920212223242526
  1. #!/bin/bash
  2. RETCODE=$(fw_exists ${IROOT}/lwan.installed)
  3. [ ! "$RETCODE" == 0 ] || { \
  4. source $IROOT/lwan.installed
  5. return 0; }
  6. REV='ff549b46548fefb2a1dd2a4c6a22c345fcfb3eeb'
  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 -DCMAKE_INSTALL_PREFIX=$IROOT
  16. make techempower
  17. make install
  18. echo "export LWAN_ROOT=${LWAN_HOME}" > $IROOT/lwan.installed
  19. echo -e "export LWAN_BUILD=\$LWAN_ROOT/build" >> $IROOT/lwan.installed
  20. source $IROOT/lwan.installed