docker-build.sh 657 B

123456789101112131415161718192021222324252627282930
  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. fi
  20. done
  21. set +x
  22. echo -e "\nBUILD FINISHED\n"
  23. echo "You can copy the resulting images from the container using:"
  24. echo -e "\ndocker cp ${HOSTNAME}:/usr/src/build/gluon/images <destination>\n"