Fedora Remix maintained by the Rochester Institute of Technology (RIT) Linux Users Group, targeted at users new to Linux and RIT students, faculty, and staff
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

32 lines
1.8 KiB

7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
  1. #!/bin/bash
  2. set -eu
  3. #################################################################################
  4. # TigerOS Build Script(source iso) for running on the build box with Jenkins CI #
  5. # @author: Aidan Kahrs #
  6. # #
  7. # Usage: sudo bash ci-build-mock.sh #
  8. # #
  9. #################################################################################
  10. # Check that the current user is root
  11. if [ $EUID != 0 ]
  12. then
  13. echo "Please run this script as root (sudo $@$0)."
  14. exit
  15. fi
  16. wget -O tigeros-source.ks https://raw.githubusercontent.com/RITlug/TigerOS/master/tigeros-source.ks
  17. mock --old-chroot -r fedora-26-x86_64 --init
  18. mock --old-chroot -r fedora-26-x86_64 --copyin tigeros-source.ks ./tigeros-source.ks
  19. mock --old-chroot -r fedora-26-x86_64 --install pungi
  20. mock --old-chroot -r fedora-26-x86_64 --install https://tigeros.ritlug.com/packages/x86_64/anaconda-installclass-tigeros-26-1.fc26.x86_64.rpm
  21. mock --old-chroot -r fedora-26-x86_64 --chroot "pungi -G -c tigeros-source.ks --name=TigerOS --ver 26 --force && pungi -C -c tigeros-source.ks --name=TigerOS --ver=26 --force && pungi -I -c tigeros-source.ks --name=TigerOS --ver=26 --sourceisos --force"
  22. rm -rf /srv/isos/TigerOS-source-$(date +%Y%m%d).iso
  23. mock --old-chroot -r fedora-26-x86_64 --copyout /26/source/iso/TigerOS-DVD-source-26.iso /srv/isos/TigerOS-source-$(date +%Y%m%d).iso
  24. rm -rf /var/lib/mock/
  25. cd /srv/isos
  26. rm -rf CHECKSUM512-source-$(date +%Y%m%d)
  27. sha512sum TigerOS-source-$(date +%Y%m%d).iso > CHECKSUM512-source-$(date +%Y%m%d)
  28. chown -R nginx:nginx /srv
  29. chmod 755 /srv/isos/*.iso
  30. echo "Pungi finished"