diff --git a/build.sh b/build.sh index 46d773d..c1ff77f 100755 --- a/build.sh +++ b/build.sh @@ -144,7 +144,7 @@ run_stage() { unmount "${WORK_DIR}/${STAGE}" if [ ! -f SKIP_IMAGES ]; then - if [ -f "${STAGE_DIR}/EXPORT_IMAGE" ] || [ -f "${STAGE_DIR}/EXPORT_ISO" ] || [ -f "${STAGE_DIR}/EXPORT_SQUASHFS" ]; then + if [ -f "${STAGE_DIR}/EXPORT_IMG" ] || [ -f "${STAGE_DIR}/EXPORT_ISO" ] || [ -f "${STAGE_DIR}/EXPORT_SQUASHFS" ] || [ -f "${STAGE_DIR}/EXPORT_NOOBS" ]; then EXPORT_DIRS="${EXPORT_DIRS} ${STAGE_DIR}" fi fi @@ -184,7 +184,7 @@ term() { log "Build finished" fi unmount "${STAGE_WORK_DIR}" - if [ "$STAGE" = "export-image" ]; then + if [ "$STAGE" = "exports/img" ]; then for img in "${STAGE_WORK_DIR}/"*.img; do unmount_image "$img" done @@ -332,11 +332,7 @@ log "Begin ${BASE_DIR}" STAGE_LIST=${STAGE_LIST:-${BASE_DIR}/stage*} export STAGE_LIST -EXPORT_CONFIG_DIR=$(realpath "${EXPORT_CONFIG_DIR:-"${BASE_DIR}/export-image"}") -if [ ! -d "${EXPORT_CONFIG_DIR}" ]; then - echo "EXPORT_CONFIG_DIR invalid: ${EXPORT_CONFIG_DIR} does not exist" - exit 1 -fi +EXPORT_CONFIG_DIR="${EXPORT_CONFIG_DIR:-"${BASE_DIR}/exports"}" export EXPORT_CONFIG_DIR for STAGE_DIR in $STAGE_LIST; do @@ -351,18 +347,18 @@ for EXPORT_DIR in ${EXPORT_DIRS}; do STAGE_DIR=${EXPORT_CONFIG_DIR} # shellcheck source=/dev/null source "${EXPORT_DIR}/EXPORT_ISO" - STAGE_DIR="${BASE_DIR}/export-iso" + STAGE_DIR="${BASE_DIR}/exports/iso" run_stage fi - if [ -e "${EXPORT_DIR}/EXPORT_IMAGE" ]; then + if [ -e "${EXPORT_DIR}/EXPORT_IMG" ]; then STAGE_DIR=${EXPORT_CONFIG_DIR} # shellcheck source=/dev/null - source "${EXPORT_DIR}/EXPORT_IMAGE" - STAGE_DIR="${BASE_DIR}/export-image" + source "${EXPORT_DIR}/EXPORT_IMG" + STAGE_DIR="${BASE_DIR}/exports/img" run_stage fi if [ -e "${EXPORT_DIR}/EXPORT_SQUASHFS" ]; then - STAGE_DIR="${BASE_DIR}/export-squashfs" + STAGE_DIR="${BASE_DIR}/exports/squashfs" run_stage fi if [ "${USE_QEMU}" != "1" ]; then diff --git a/export-image/00-allow-rerun/00-run.sh b/exports/img/00-allow-rerun/00-run.sh old mode 100755 new mode 100644 similarity index 100% rename from export-image/00-allow-rerun/00-run.sh rename to exports/img/00-allow-rerun/00-run.sh diff --git a/export-image/01-set-sources/01-run.sh b/exports/img/01-set-sources/01-run.sh old mode 100755 new mode 100644 similarity index 100% rename from export-image/01-set-sources/01-run.sh rename to exports/img/01-set-sources/01-run.sh diff --git a/export-image/02-network/01-run.sh b/exports/img/02-network/01-run.sh old mode 100755 new mode 100644 similarity index 100% rename from export-image/02-network/01-run.sh rename to exports/img/02-network/01-run.sh diff --git a/export-image/02-network/files/resolv.conf b/exports/img/02-network/files/resolv.conf similarity index 100% rename from export-image/02-network/files/resolv.conf rename to exports/img/02-network/files/resolv.conf diff --git a/export-image/03-set-partuuid/00-run.sh b/exports/img/03-set-partuuid/00-run.sh old mode 100755 new mode 100644 similarity index 100% rename from export-image/03-set-partuuid/00-run.sh rename to exports/img/03-set-partuuid/00-run.sh diff --git a/export-image/04-finalise/01-run.sh b/exports/img/04-finalise/01-run.sh old mode 100755 new mode 100644 similarity index 100% rename from export-image/04-finalise/01-run.sh rename to exports/img/04-finalise/01-run.sh diff --git a/export-image/prerun.sh b/exports/img/prerun.sh old mode 100755 new mode 100644 similarity index 100% rename from export-image/prerun.sh rename to exports/img/prerun.sh diff --git a/export-iso/00-allow-rerun/00-run.sh b/exports/iso/00-allow-rerun/00-run.sh old mode 100755 new mode 100644 similarity index 100% rename from export-iso/00-allow-rerun/00-run.sh rename to exports/iso/00-allow-rerun/00-run.sh diff --git a/export-iso/01-set-sources/01-run.sh b/exports/iso/01-set-sources/01-run.sh old mode 100755 new mode 100644 similarity index 100% rename from export-iso/01-set-sources/01-run.sh rename to exports/iso/01-set-sources/01-run.sh diff --git a/export-iso/02-network/01-run.sh b/exports/iso/02-network/01-run.sh old mode 100755 new mode 100644 similarity index 100% rename from export-iso/02-network/01-run.sh rename to exports/iso/02-network/01-run.sh diff --git a/export-iso/02-network/files/resolv.conf b/exports/iso/02-network/files/resolv.conf similarity index 100% rename from export-iso/02-network/files/resolv.conf rename to exports/iso/02-network/files/resolv.conf diff --git a/export-iso/03-finalise/01-run.sh b/exports/iso/03-finalise/01-run.sh old mode 100755 new mode 100644 similarity index 100% rename from export-iso/03-finalise/01-run.sh rename to exports/iso/03-finalise/01-run.sh diff --git a/export-iso/prerun.sh b/exports/iso/prerun.sh old mode 100755 new mode 100644 similarity index 100% rename from export-iso/prerun.sh rename to exports/iso/prerun.sh diff --git a/export-noobs/00-release/00-run.sh b/exports/noobs/00-release/00-run.sh old mode 100755 new mode 100644 similarity index 100% rename from export-noobs/00-release/00-run.sh rename to exports/noobs/00-release/00-run.sh diff --git a/export-noobs/00-release/files/OS.png b/exports/noobs/00-release/files/OS.png similarity index 100% rename from export-noobs/00-release/files/OS.png rename to exports/noobs/00-release/files/OS.png diff --git a/export-noobs/00-release/files/marketing/slides_vga/A.png b/exports/noobs/00-release/files/marketing/slides_vga/A.png similarity index 100% rename from export-noobs/00-release/files/marketing/slides_vga/A.png rename to exports/noobs/00-release/files/marketing/slides_vga/A.png diff --git a/export-noobs/00-release/files/marketing/slides_vga/B.png b/exports/noobs/00-release/files/marketing/slides_vga/B.png similarity index 100% rename from export-noobs/00-release/files/marketing/slides_vga/B.png rename to exports/noobs/00-release/files/marketing/slides_vga/B.png diff --git a/export-noobs/00-release/files/marketing/slides_vga/C.png b/exports/noobs/00-release/files/marketing/slides_vga/C.png similarity index 100% rename from export-noobs/00-release/files/marketing/slides_vga/C.png rename to exports/noobs/00-release/files/marketing/slides_vga/C.png diff --git a/export-noobs/00-release/files/marketing/slides_vga/D.png b/exports/noobs/00-release/files/marketing/slides_vga/D.png similarity index 100% rename from export-noobs/00-release/files/marketing/slides_vga/D.png rename to exports/noobs/00-release/files/marketing/slides_vga/D.png diff --git a/export-noobs/00-release/files/marketing/slides_vga/E.png b/exports/noobs/00-release/files/marketing/slides_vga/E.png similarity index 100% rename from export-noobs/00-release/files/marketing/slides_vga/E.png rename to exports/noobs/00-release/files/marketing/slides_vga/E.png diff --git a/export-noobs/00-release/files/marketing/slides_vga/F.png b/exports/noobs/00-release/files/marketing/slides_vga/F.png similarity index 100% rename from export-noobs/00-release/files/marketing/slides_vga/F.png rename to exports/noobs/00-release/files/marketing/slides_vga/F.png diff --git a/export-noobs/00-release/files/marketing/slides_vga/G.png b/exports/noobs/00-release/files/marketing/slides_vga/G.png similarity index 100% rename from export-noobs/00-release/files/marketing/slides_vga/G.png rename to exports/noobs/00-release/files/marketing/slides_vga/G.png diff --git a/export-noobs/00-release/files/os.json b/exports/noobs/00-release/files/os.json similarity index 100% rename from export-noobs/00-release/files/os.json rename to exports/noobs/00-release/files/os.json diff --git a/export-noobs/00-release/files/partition_setup.sh b/exports/noobs/00-release/files/partition_setup.sh old mode 100755 new mode 100644 similarity index 100% rename from export-noobs/00-release/files/partition_setup.sh rename to exports/noobs/00-release/files/partition_setup.sh diff --git a/export-noobs/00-release/files/partitions.json b/exports/noobs/00-release/files/partitions.json similarity index 100% rename from export-noobs/00-release/files/partitions.json rename to exports/noobs/00-release/files/partitions.json diff --git a/export-noobs/00-release/files/release_notes.txt b/exports/noobs/00-release/files/release_notes.txt similarity index 100% rename from export-noobs/00-release/files/release_notes.txt rename to exports/noobs/00-release/files/release_notes.txt diff --git a/export-noobs/prerun.sh b/exports/noobs/prerun.sh old mode 100755 new mode 100644 similarity index 100% rename from export-noobs/prerun.sh rename to exports/noobs/prerun.sh diff --git a/export-squashfs/00-finalise/01-run.sh b/exports/squashfs/00-finalise/01-run.sh similarity index 100% rename from export-squashfs/00-finalise/01-run.sh rename to exports/squashfs/00-finalise/01-run.sh diff --git a/export-squashfs/prerun.sh b/exports/squashfs/prerun.sh similarity index 100% rename from export-squashfs/prerun.sh rename to exports/squashfs/prerun.sh