On 08/18/2011 02:16 AM, Gerardo Exequiel Pozzi wrote:
<project> - work<- $work_dir - out<- $out_dir
Signed-off-by: Gerardo Exequiel Pozzi<vmlinuz386@yahoo.com.ar> --- configs/baseline/build.sh | 4 +++- configs/releng/build.sh | 11 +++++++---- 2 files changed, 10 insertions(+), 5 deletions(-)
diff --git a/configs/baseline/build.sh b/configs/baseline/build.sh index 0795eda..71024c4 100755 --- a/configs/baseline/build.sh +++ b/configs/baseline/build.sh @@ -8,6 +8,7 @@ iso_version=$(date +%Y.%m.%d) install_dir=arch arch=$(uname -m) work_dir=work +out_dir=out verbose="n"
script_path=$(readlink -f ${0%/*}) @@ -79,7 +80,8 @@ make_prepare() { # Build ISO make_iso() { mkarchiso ${verbose} checksum "${work_dir}" - mkarchiso ${verbose} -D "${install_dir}" -L "${iso_label}" iso "${work_dir}" "${iso_name}-${iso_version}-${arch}.iso" + mkdir -p ${out_dir} + mkarchiso ${verbose} -D "${install_dir}" -L "${iso_label}" iso "${work_dir}" "${out_dir}/${iso_name}-${iso_version}-${arch}.iso" }
if [[ $verbose == "y" ]]; then diff --git a/configs/releng/build.sh b/configs/releng/build.sh index e0d42ab..2b60a60 100755 --- a/configs/releng/build.sh +++ b/configs/releng/build.sh @@ -8,6 +8,7 @@ iso_version=$(date +%Y.%m.%d) install_dir=arch arch=$(uname -m) work_dir=work +out_dir=out verbose="n"
script_path=$(readlink -f ${0%/*}) @@ -164,7 +165,8 @@ make_prepare() { make_iso() { local _iso_type=${1} mkarchiso ${verbose} checksum "${work_dir}" - mkarchiso ${verbose} -D "${install_dir}" -L "${iso_label}" iso "${work_dir}" "${iso_name}-${iso_version}-${_iso_type}-${arch}.iso" + mkdir -p ${out_dir} + mkarchiso ${verbose} -D "${install_dir}" -L "${iso_label}" iso "${work_dir}" "${out_dir}/${iso_name}-${iso_version}-${_iso_type}-${arch}.iso" }
# Build dual-iso images from ${work_dir}/i686/iso and ${work_dir}/x86_64/iso @@ -208,7 +210,8 @@ make_dual() { s|%INSTALL_DIR%|${install_dir}|g" ${_cfg}> ${work_dir}/dual/iso/${install_dir}/boot/syslinux/${_cfg##*/} done mkarchiso ${verbose} checksum "${work_dir}/dual" - mkarchiso ${verbose} -D "${install_dir}" -L "${iso_label}" iso "${work_dir}/dual" "${iso_name}-${iso_version}-${_iso_type}-dual.iso" + mkdir -p ${out_dir} + mkarchiso ${verbose} -D "${install_dir}" -L "${iso_label}" iso "${work_dir}/dual" "${out_dir}/${iso_name}-${iso_version}-${_iso_type}-dual.iso" :> ${work_dir}/dual/build.${FUNCNAME}_${_iso_type} fi } @@ -298,11 +301,11 @@ case "${command_name}" in ;; clean_single) rm -rf ${work_dir} - rm -f ${iso_name}-${iso_version}-*-${arch}.iso + rm -f ${out_dir}/${iso_name}-${iso_version}-*-${arch}.iso ;; clean_dual) rm -rf ${work_dir}/dual - rm -f ${iso_name}-${iso_version}-*-dual.iso + rm -f ${out_dir}/${iso_name}-${iso_version}-*-dual.iso ;; *) echo "Invalid command name '${command_name}'"
Ignore this. I reworked it. Implemented -o out_dir (default to "out") in mkarchiso, also -w work_dir (default to "work"). Both build.sh update to use this feature. I will do some tests before send again the [RFC] patches. -- Gerardo Exequiel Pozzi \cos^2\alpha + \sin^2\alpha = 1