build.sh 875 B

123456789101112131415161718192021222324252627282930313233
  1. #!/bin/bash
  2. set -x -e
  3. # Clean up
  4. rm -rf gluon
  5. git clone https://github.com/freifunk-gluon/gluon.git gluon -b "${GLUON_TAG}"
  6. # Add site configuration
  7. mkdir -p gluon/site
  8. cp /usr/src/site.mk gluon/site/
  9. cp /usr/src/site.conf gluon/site/
  10. cp -r /usr/src/i18n gluon/site/
  11. # Build
  12. cd gluon
  13. make update
  14. time make -j $(($(nproc)+1)) V=s BROKEN=1 GLUON_TARGET=ar71xx-generic
  15. make clean
  16. time make -j $(($(nproc)+1)) V=s BROKEN=1 GLUON_TARGET=ar71xx-nand
  17. make clean
  18. time make -j $(($(nproc)+1)) V=s BROKEN=1 GLUON_TARGET=mpc85xx-generic
  19. make clean
  20. time make -j $(($(nproc)+1)) V=s BROKEN=1 GLUON_TARGET=x86-generic
  21. make clean
  22. time make -j $(($(nproc)+1)) V=s BROKEN=1 GLUON_TARGET=x86-64
  23. make clean
  24. set +x
  25. echo -e "\nBUILD FINISHED\n"
  26. echo "You can copy the resulting images from the container using:"
  27. echo -e "\ndocker cp ${HOSTNAME}:/usr/src/build/gluon/output <destination>\n"