[MOVED TO GITLAB] Please visit new location: https://gitlab.com/RITlug/TigerOS
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.

35 lines
1.5 KiB

3 years ago
3 years ago
3 years ago
  1. #!/bin/bash
  2. set -eu
  3. ####################################################################
  4. # TigerOS Build Script #
  5. # @author: Aidan Kahrs #
  6. # #
  7. # Usage: sudo bash make-iso.sh #
  8. # #
  9. ####################################################################
  10. green=`tput setaf 2`
  11. reset=`tput sgr0`
  12. vers=28
  13. result_dir=/var/lmc/TigerOS
  14. #to use mock comment out lines 25, $vers and 30 and uncomment all lines beginning with mock
  15. echo "${green}Welcome to the TigerOS build script${reset}"
  16. # Check that the current user is root
  17. if [ $EUID != 0 ]
  18. then
  19. echo "Please run this script as root (sudo $@$0)."
  20. exit
  21. fi
  22. # /var/lmc/TigerOS cannot exist before building
  23. if [ -d $result_dir ]
  24. then
  25. rm -rf $result_dir
  26. fi
  27. dnf install -y lorax-lmc-novirt git vim-minimal pykickstart
  28. dnf install -y https://mirrors.ritlug.com/TigerOS/$vers/packages/x86_64/anaconda-installclass-tigeros-$vers-1.fc$vers.x86_64.rpm
  29. echo "${green}Beginning build process${reset}"
  30. setenforce 0
  31. livemedia-creator --ks kickstarts/tigeros.ks --no-virt --resultdir $result_dir --project TigerOS-Live --make-iso --volid TigerOS --iso-only --iso-name TigerOS.iso --releasever $vers --title TigerOS-live --macboot
  32. echo "${green}ISO saved to $result_dir/TigerOS.iso${reset}"
  33. setenforce 1