Skip to content

Commit

Permalink
netboot package: use ISO_NAME-netboot.tar as output name (without .iso)
Browse files Browse the repository at this point in the history
  • Loading branch information
zeha committed Dec 15, 2024
1 parent 4726496 commit 860352c
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions grml-live
Original file line number Diff line number Diff line change
Expand Up @@ -1724,7 +1724,8 @@ fi

# netboot package {{{
create_netbootpackage() {
local OUTPUT_FILE="${NETBOOT}/grml_netboot_package_${GRML_NAME}_${VERSION}.tar"
local OUTPUT_NAME=$(basename "${ISO_NAME}" .iso)-netboot
local OUTPUT_FILE="${NETBOOT}/${OUTPUT_NAME}-netboot.tar"

if [ -f "${OUTPUT_FILE}" ] && [ -z "$UPDATE" ] && [ -z "$BUILD_ONLY" ] && [ -z "$BUILD_DIRTY" ] ; then
log "Skipping stage 'netboot' as $OUTPUT_FILE exists already."
Expand All @@ -1739,7 +1740,7 @@ create_netbootpackage() {
mkdir -p "$NETBOOT"

local OUTPUTDIR="${NETBOOT}/build_tmp"
local WORKING_DIR="${OUTPUTDIR}/grml_netboot_package_${GRML_NAME}_${VERSION}/tftpboot/"
local WORKING_DIR="${OUTPUTDIR}/${OUTPUT_NAME}/tftpboot/"

mkdir -p "$WORKING_DIR"

Expand Down Expand Up @@ -1843,7 +1844,7 @@ create_netbootpackage() {
fi
fi # amd64 or arm64

if tar -C "$OUTPUTDIR" -cf "${OUTPUT_FILE}" "grml_netboot_package_${GRML_NAME}_${VERSION}" ; then
if tar -C "$OUTPUTDIR" -cf "${OUTPUT_FILE}" "${OUTPUT_NAME}" ; then
(
# shellcheck disable=SC2164 # We just wrote there. If it disappeared, too bad.
cd "$(dirname "${OUTPUT_FILE}")"
Expand Down

0 comments on commit 860352c

Please sign in to comment.