Skip to content

Commit 0af3491

Browse files
committed
[fix] : FIxed clean command
1 parent 5d624c5 commit 0af3491

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

build.sh

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -352,14 +352,6 @@ _run_cleansh(){
352352

353353
# Check the build environment and create a directory.
354354
prepare_env() {
355-
# Set dirs
356-
work_dir="$(realpath "${work_dir}")"
357-
build_dir="${work_dir}/build"
358-
cache_dir="${work_dir}/cache/${arch}"
359-
airootfs_dir="${build_dir}/${arch}/airootfs"
360-
isofs_dir="${build_dir}/iso"
361-
lockfile_dir="${build_dir}/lockfile"
362-
363355
# Check packages
364356
if [[ "${nodepend}" = false ]]; then
365357
local _check_failed=false _pkg _result=0
@@ -383,11 +375,6 @@ prepare_env() {
383375
if [[ -z "$(lsmod | getclm 1 | grep -x "loop")" ]]; then modprobe loop; fi
384376
fi
385377

386-
# Create dir
387-
for _dir in "${build_dir}" "${cache_dir}" "${airootfs_dir}" "${isofs_dir}" "${lockfile_dir}"; do
388-
mkdir -p "${_dir}"
389-
done
390-
391378
# Check work dir
392379
if [[ "${normwork}" = false ]]; then
393380
msg_info "Deleting the contents of ${build_dir}..."
@@ -1302,6 +1289,19 @@ else
13021289
channel_dir="${script_path}/channels/${channel_name}"
13031290
fi
13041291

1292+
# Set dirs
1293+
work_dir="$(realpath "${work_dir}")"
1294+
build_dir="${work_dir}/build"
1295+
cache_dir="${work_dir}/cache/${arch}"
1296+
airootfs_dir="${build_dir}/${arch}/airootfs"
1297+
isofs_dir="${build_dir}/iso"
1298+
lockfile_dir="${build_dir}/lockfile"
1299+
1300+
# Create dir
1301+
for _dir in "${build_dir}" "${cache_dir}" "${airootfs_dir}" "${isofs_dir}" "${lockfile_dir}"; do
1302+
mkdir -p "${_dir}"
1303+
done
1304+
13051305
# Set for special channels
13061306
if [[ -d "${channel_dir}.add" ]]; then
13071307
channel_name="${1}"

0 commit comments

Comments
 (0)