You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

60 lines
1.1 KiB
Bash

#!/bin/sh
set -x
set -e
set -u
set +f
BUILD_ID="${BUILD_ID:-XXX}"
FS_LABEL="ROSA_2021.1_XFCE_Test_${BUILD_ID}"
# TODO: make everything universal for all arches
AARCH64="${AARCH64:-0}"
SLEEP="${SLEEP:-0}"
# Allow to pass extra args like location of cache etc.
LIVECD_CREATOR_EXTRA_ARGS="${LIVECD_CREATOR_EXTRA_ARGS:-}"
conf="$(mktemp)"
cp main.ks "$conf"
repobase="$(mktemp)"
cp repobase.ks "$repobase"
pkgs="$(mktemp)"
cp packages.ks "$pkgs"
if [ "$AARCH64" = 1 ] ; then
FS_LABEL="ROSA_2021.1_XFCE_aarch64_${BUILD_ID}"
# temp, better make one universal list
cp repobase-aarch64.ks "$repobase"
# x86-specific
sed -i -e '/syslinux/d' "$pkgs"
sed -i -e '/virtualbox/d' "$pkgs"
# TODO: build unar
sed -i -e '/unrar/d' "$pkgs"
fi
sed -i -e "s,repobase.ks,${repobase},g" "$conf"
sed -i -e "s,packages.ks,${pkgs},g" "$conf"
sleep "$SLEEP"
dnf distrosync -y
dnf install -y \
coreutils \
findutils \
lsof \
sed \
tar \
util-linux \
/usr/bin/livecd-creator
mkdir -p /home/vagrant/results
livecd-creator --verbose \
--compression-type=xz \
--config="$conf" \
${LIVECD_CREATOR_EXTRA_ARGS} \
--fslabel="$FS_LABEL"
mv -v *.iso /home/vagrant/results/