From fb9276351ae6d7e43e243b142e8cd9429b00c1d5 Mon Sep 17 00:00:00 2001 From: Vlastimil Holer Date: Tue, 30 Jan 2018 18:37:36 +0100 Subject: [PATCH] gh-57: Generate ISO from the out/ directory --- generate-all.sh | 3 ++- generate.sh | 10 ++++++++++ targets.sh | 4 ++++ 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/generate-all.sh b/generate-all.sh index afd0cd1..069cb93 100755 --- a/generate-all.sh +++ b/generate-all.sh @@ -1,6 +1,7 @@ -TARGETS='el6 el7 el7_ec2 suse deb deb_ec2 alpine' +TARGETS='el6 el7 el7_ec2 suse deb deb_ec2 alpine iso' set -e + for TARGET in $TARGETS; do TARGET="${TARGET}" ./generate.sh done diff --git a/generate.sh b/generate.sh index cd37b37..2c2cc0f 100755 --- a/generate.sh +++ b/generate.sh @@ -56,6 +56,8 @@ if [ "${TYPE}" = 'deb' ]; then elif [ "${TYPE}" = 'apk' ]; then RELEASE_FULL="r${RELEASE_FULL}" FILENAME="${NAME}-${VERSION}-${RELEASE_FULL}.${TYPE}" +elif [ "${TYPE}" = 'iso' ]; then + FILENAME="${NAME}-${VERSION}-${RELEASE_FULL}.${TYPE}" else FILENAME="${NAME}-${VERSION}-${RELEASE_FULL}.noarch.${TYPE}" fi @@ -107,6 +109,14 @@ fi if [ "${TYPE}" = 'dir' ]; then cp -rT "${BUILD_DIR}" "${OUT}" + +elif [ "${TYPE}" = 'iso' ]; then + mkisofs -J -R -input-charset utf8 \ + -m '*.iso' \ + -V "${FILENAME%.*}" \ + -o "${OUT}" \ + $(dirname "${OUT}") + else CONFIG_FILES=$(cd "${BUILD_DIR}" && \ find etc/ \ diff --git a/targets.sh b/targets.sh index 195baff..3d032f1 100644 --- a/targets.sh +++ b/targets.sh @@ -131,6 +131,10 @@ case "${TARGET}" in PREUN=${PREUN:-preuninstall.ec2 preuninstall} ;; + 'iso') + NAME=${NAME:-one-context-linux} + TYPE=${TYPE:-iso} + ;; 'arch') NAME=${NAME:-one-context}