Browse Source

add script to build source iso

website
axk4545 7 years ago
parent
commit
a81d9a049b
1 changed files with 31 additions and 0 deletions
  1. +31
    -0
      ci-pungi.sh

+ 31
- 0
ci-pungi.sh View File

@ -0,0 +1,31 @@
#!/bin/bash
set -eu
#################################################################################
# TigerOS Build Script(source iso) for running on the build box with Jenkins CI #
# @author: Aidan Kahrs #
# #
# Usage: sudo bash ci-build-mock.sh #
# #
#################################################################################
# Check that the current user is root
if [ $EUID != 0 ]
then
echo "Please run this script as root (sudo $@$0)."
exit
fi
wget -O tigeros-source.ks https://raw.githubusercontent.com/RITlug/TigerOS/master/tigeros-source.ks
mock -r fedora-25-x86_64 --init
mock -r fedora-25-x86_64 --copyin tigeros-source.ks ./tigeros-source.ks
mock -r fedora-25-x86_64 --install pungi
mock -r fedora-25-x86_64 --chroot "pungi -G -c tigeros-source.ks --name=TigerOS --force && pungi -C -c tigeros-source.ks --name=TigerOS --force && pungi -I -c tigeros-source.ks --name=TigerOS --ver=$(date +%Y%m%d)--sourceisos --force"
rm -rf /srv/isos/TigerOS-source-$(date +%Y%m%d).iso
mock -r fedora-25-x86_64 --copyout /var/lmc/TigerOS.iso /srv/isos/TigerOS-$(date +%Y%m%d).iso
rm -rf /var/lib/mock/
cd /srv/isos
rm -rf CHECKSUM512-source-$(date +%Y%m%d)
sha512sum TigerOS-source-$(date +%Y%m%d).iso > CHECKSUM512-$(date +%Y%m%d)
chown -R nginx:nginx /srv
chmod 755 /srv/isos/*.iso
echo "Pungi finished"

Loading…
Cancel
Save