From 0af34914879fd5811d2bba8204181d7345faf9fb Mon Sep 17 00:00:00 2001 From: hayao Date: Fri, 16 Apr 2021 18:40:25 +0900 Subject: [PATCH] [fix] : FIxed clean command --- build.sh | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/build.sh b/build.sh index 98318607..cc81a331 100755 --- a/build.sh +++ b/build.sh @@ -352,14 +352,6 @@ _run_cleansh(){ # Check the build environment and create a directory. prepare_env() { - # Set dirs - work_dir="$(realpath "${work_dir}")" - build_dir="${work_dir}/build" - cache_dir="${work_dir}/cache/${arch}" - airootfs_dir="${build_dir}/${arch}/airootfs" - isofs_dir="${build_dir}/iso" - lockfile_dir="${build_dir}/lockfile" - # Check packages if [[ "${nodepend}" = false ]]; then local _check_failed=false _pkg _result=0 @@ -383,11 +375,6 @@ prepare_env() { if [[ -z "$(lsmod | getclm 1 | grep -x "loop")" ]]; then modprobe loop; fi fi - # Create dir - for _dir in "${build_dir}" "${cache_dir}" "${airootfs_dir}" "${isofs_dir}" "${lockfile_dir}"; do - mkdir -p "${_dir}" - done - # Check work dir if [[ "${normwork}" = false ]]; then msg_info "Deleting the contents of ${build_dir}..." @@ -1302,6 +1289,19 @@ else channel_dir="${script_path}/channels/${channel_name}" fi +# Set dirs +work_dir="$(realpath "${work_dir}")" +build_dir="${work_dir}/build" +cache_dir="${work_dir}/cache/${arch}" +airootfs_dir="${build_dir}/${arch}/airootfs" +isofs_dir="${build_dir}/iso" +lockfile_dir="${build_dir}/lockfile" + +# Create dir +for _dir in "${build_dir}" "${cache_dir}" "${airootfs_dir}" "${isofs_dir}" "${lockfile_dir}"; do + mkdir -p "${_dir}" +done + # Set for special channels if [[ -d "${channel_dir}.add" ]]; then channel_name="${1}" -- 2.11.0