Added --build-all option

This commit is contained in:
2Shirt 2019-05-24 16:45:52 -06:00
parent f395f7aec1
commit ddbe3b0e71
Signed by: 2Shirt
GPG key ID: 152FAC923B0E132C

View file

@ -369,6 +369,37 @@ function build_iso() {
chown $REAL_USER:$REAL_USER "$OUT_DIR" -R
}
function build_all() {
if [[ "$EUID" -eq 0 ]]; then
echo "This section not meant to be run as root."
echo "Aborted."
exit 1
fi
# Prep for build (full)
cleanup
fix_kit_permissions
install_deps
load_settings --edit
update_repo
copy_live_env
update_live_env
# Rerun script as root to start Archiso build process
run_elevated "$(realpath "$0")" --build-iso
# Cleanup
mv -nv "$LIVE_DIR" "${LIVE_DIR}.full"
perl-rename -v "s/^(${KIT_NAME_FULL}-Linux)-(${DATE}.*)$/\1-Full-\2/" "$OUT_DIR"/*
# Prep for build (minimal)
copy_live_env --minimal
update_live_env --minimal
# Rerun script as root to start Archiso build process
run_elevated "$(realpath "$0")" --build-iso
# Cleanup
mv -nv "$LIVE_DIR" "${LIVE_DIR}.minimal"
perl-rename -v "s/^(${KIT_NAME_FULL}-Linux)-(${DATE}.*)$/\1-Minimal-\2/" "$OUT_DIR"/*
}
function build_full() {
if [[ "$EUID" -eq 0 ]]; then
echo "This section not meant to be run as root."
@ -390,6 +421,11 @@ function build_full() {
# Check input
case ${1:-} in
-a|--build-all)
build_all
echo Done
;;
-b|--build-full)
build_full
echo Done
@ -434,7 +470,8 @@ case ${1:-} in
echo "Usage: $(basename "$0") [OPTIONS]"
echo ""
echo "Options:"
echo " -b --build-full Perform all tasks and build iso"
echo " -a --build-all Perform all tasks to build all isos"
echo " -b --build-full Perform all tasks to build the full iso"
echo " -h --help Show usage"
echo ""
echo "Advanced options:"