docker-build.sh 708 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. for target in $(ls targets/)
  15. do
  16. if [ -d "targets/$target" ]; then
  17. echo "Building for target $target"
  18. time make -j $(($(nproc)+1)) BROKEN=1 GLUON_TARGET=$target
  19. make dirclean
  20. fi
  21. done
  22. make manifest GLUON_BRANCH=stable
  23. set +x
  24. echo -e "\nBUILD FINISHED\n"
  25. echo "You can copy the resulting images from the container using:"
  26. echo -e "\ndocker cp ${HOSTNAME}:/usr/src/build/gluon/output <destination>\n"