From dagbrown, 2 Years ago, written in Plain Text.
Embed
  1. #!/bin/bash
  2.  
  3. echo "Build started at $(date)"
  4.  
  5. PATH=/sbin:/bin:/usr/sbin:/usr/bin:.
  6. export PATH
  7.  
  8. sudo rm -rf lunar-iso
  9.  
  10. git clone git@github.com:lunar-linux/lunar-iso.git
  11. cd lunar-iso
  12.  
  13. corecount=$(grep processor /proc/cpuinfo | wc -l)
  14. makecount=$[corecount*2]
  15.  
  16. cat >> conf/config << EOT
  17. ISO_ARCH = $(arch)
  18. ISO_MAJOR = 1.7.1
  19. ISO_MINOR = $(date +testing-%Y%m%d)
  20.  
  21. ifeq (,\$(ISO_MINOR))
  22.   ISO_VERSION = \$(ISO_MAJOR)-\$(ISO_ARCH)
  23. else
  24.   ISO_VERSION = \$(ISO_MAJOR)-\$(ISO_MINOR)-\$(ISO_ARCH)
  25. endif
  26.  
  27. ISO_CODENAME = Mare Incognitum
  28.  
  29. ISO_BUILD = \$(ISO_ARCH)-pc-linux-gnu
  30.  
  31. ISO_CNAME = \$(ISO_VERSION) (\$(ISO_CODENAME) - \$(ISO_DATE))
  32.  
  33. ISO_LABEL = \$(shell echo -n Lunar-Linux \$(ISO_CODENAME) | tr '[:space:]' _)
  34.  
  35. ISO_LUNAR_MODULE = lunar
  36.  
  37. ISO_MAKES = ${makecount}
  38.  
  39. ISO_GCCARCH = $(arch)
  40. EOT
  41.  
  42. sudo make || sudo make || sudo make
  43.  
  44. if [ -f *.iso ]
  45. then
  46.     mkdir -p ../daily
  47.     cp *.iso ../daily
  48.     for i in ../daily/*.iso
  49.     do
  50.         if [ ! -f ${i}.sha256 ]
  51.         then
  52.             sha256sum $i > ${i}.sha256
  53.         fi
  54.     done
  55. fi
  56.  
  57. echo "Build finished at $(date)"