OSDN Git Service

[fix] : Set dirs in prepare_env
authorhayao <hayao@fascode.net>
Thu, 8 Apr 2021 05:56:47 +0000 (14:56 +0900)
committerhayao <hayao@fascode.net>
Thu, 8 Apr 2021 05:56:47 +0000 (14:56 +0900)
build.sh

index d325c2f..ecad45f 100755 (executable)
--- a/build.sh
+++ b/build.sh
@@ -341,6 +341,12 @@ check_bool() {
 
 # Check the build environment and create a directory.
 prepare_env() {
+    # Set dirs
+    build_dir="${work_dir}/build"
+    cache_dir="${work_dir}/cache"
+    airootfs_dir="${build_dir}/${arch}/airootfs"
+    isofs_dir="${build_dir}/iso"
+
     # Check packages
     if [[ "${nodepend}" = false ]]; then
         local _check_failed=false _pkg _result=0
@@ -418,12 +424,6 @@ prepare_build() {
         cd "${OLDPWD}"
     fi
 
-    # Set dirs
-    build_dir="${work_dir}/build"
-    cache_dir="${work_dir}/cache"
-    airootfs_dir="${build_dir}/${arch}/airootfs"
-    isofs_dir="${build_dir}/iso"
-
     # Create dir
     mkdir -p "${airootfs_dir}" "${cache_dir}"