Skip to content

Commit cd35d5f

Browse files
committed
[fix] : USe iso_filename as log filename
1 parent f294b6d commit cd35d5f

File tree

1 file changed

+11
-14
lines changed

1 file changed

+11
-14
lines changed

build.sh

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -512,6 +512,17 @@ prepare_build() {
512512
msg_error "${channel_name} channel does not support current architecture (${arch})." "1"
513513
fi
514514

515+
# Run with tee
516+
if [[ ! "${logging}" = false ]]; then
517+
if [[ "${customized_logpath}" = false ]]; then
518+
logging="${iso_filename%.iso}.log"
519+
fi
520+
mkdir -p "$(dirname "${logging}")"; touch "${logging}"
521+
msg_warn "Re-run 'sudo ${0} ${DEFAULT_ARGUMENT} ${ARGUMENT} --nolog 2>&1 | tee ${logging}'"
522+
eval "sudo ${0} ${DEFAULT_ARGUMENT} ${ARGUMENT} --nolog 2>&1 | tee ${logging}"
523+
exit "${?}"
524+
fi
525+
515526
# Set argument of pkglist.sh
516527
pkglist_args=("-a" "${arch}" "-k" "${kernel}" "-c" "${channel_dir}" "-l" "${locale_name}")
517528
if [[ "${boot_splash}" = true ]]; then pkglist_args+=("-b"); fi
@@ -1303,20 +1314,6 @@ if [[ ! "$(bash "${tools_dir}/channel.sh" --version "${alteriso_version}" ver "$
13031314
fi
13041315
fi
13051316

1306-
# Run with tee
1307-
if [[ ! "${logging}" = false ]]; then
1308-
if [[ "${customized_logpath}" = false ]]; then
1309-
if [[ "${gitversion}" = true ]]; then
1310-
logging="${out_dir}/${iso_name}-${channel_name%.add}-${locale_name}-$(date +%Y.%m.%d)-$(git rev-parse --short HEAD)-${arch}.log"
1311-
else
1312-
logging="${out_dir}/${iso_name}-${channel_name%.add}-${locale_name}-$(date +%Y.%m.%d)-${arch}.log"
1313-
fi
1314-
fi
1315-
mkdir -p "$(dirname "${logging}")"; touch "${logging}"
1316-
msg_warn "Re-run 'sudo ${0} ${DEFAULT_ARGUMENT} ${ARGUMENT} --nolog 2>&1 | tee ${logging}'"
1317-
eval "sudo ${0} ${DEFAULT_ARGUMENT} ${ARGUMENT} --nolog 2>&1 | tee ${logging}"
1318-
exit "${?}"
1319-
fi
13201317

13211318
unset DEFAULT_ARGUMENT ARGUMENT
13221319

0 commit comments

Comments
 (0)