diff options
author | mail_redacted_for_web | 2020-03-09 15:48:20 +0100 |
---|---|---|
committer | mail_redacted_for_web | 2020-03-09 15:48:20 +0100 |
commit | 92d09f370f1ebd0a27abda0a463df953d4b79ef0 (patch) | |
tree | 68183db1a5eab962aee90d3a22b81e78e4c58cca /gen | |
download | debian-serial-isos-92d09f370f1ebd0a27abda0a463df953d4b79ef0.tar.bz2 |
InComm
Diffstat (limited to 'gen')
-rwxr-xr-x | gen | 47 |
1 files changed, 47 insertions, 0 deletions
@@ -0,0 +1,47 @@ +#!/usr/bin/env bash +# vim:tabstop=4:syntax=sh +# export SHELLCHECK_OPTS='--exclude=SC2128,SC2164' + +# define things + +# location of isohdpfx.bin: +PFXB="/usr/lib/ISOLINUX/isohdpfx.bin" + +# script from here + +RETVAL=0 +DIRS=( $(find . -maxdepth 1 -mindepth 1 -type d|grep -vP '/diff[^/]*'|awk -F/ '{print $NF}') ) +# shellcheck disable=SC2128 +[ -z "$DIRS" ]&&exit 1 + +for i in "${DIRS[@]}";do + ISOVERSTR="$(echo "$i"|sed 's/debian/Debian/;s/-//')" + # shellcheck disable=SC2128,SC2164 + ( + cd "$i/src" 2>/dev/null + [ "$?" -ne 0 ]&&printf "%b not accessible!\n" "$i/src" >&2&&exit 2 + xorriso -as mkisofs -r -J -joliet-long -l -cache-inodes -isohybrid-mbr "$PFXB"\ + -partition_offset 16 -A "$ISOVERSTR" -b isolinux/isolinux.bin -c isolinux/boot.cat\ + -no-emul-boot -boot-load-size 4 -boot-info-table -o "$i"-serial-install.iso ../src/ + case "$?" in + 0);; + *) printf "Creation of %b failed!" "$i-serial-install.iso" >&2;exit 4;; + esac + mv -v "$i"-serial-install.iso ../dst/ + case "$?" in + 0);; + *) printf "Move of %b failed!" "$i-serial-install.iso" >&2;exit 8;; + esac + );LRV="$?" + case "$LRV" in + 0);; + *) + case "$RETVAL" in + 0) RETVAL="$((100+LRV))";; + *) RETVAL=$((RETVAL+LRV));; + esac + ;; + esac +done + +exit "$RETVAL" |