Skip to content

Commit

Permalink
script: make -x option optional in scripts
Browse files Browse the repository at this point in the history
Signed-off-by: Zhang Tianyang <burning9699@gmail.com>
  • Loading branch information
Burning1020 committed Feb 1, 2024
1 parent d8f98cd commit b9ccea8
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@ bin/vmm-task:
@mkdir -p bin && cp vmm/task/target/${ARCH}-unknown-linux-musl/release/vmm-task bin/vmm-task

bin/vmlinux.bin:
@bash -x vmm/scripts/kernel/${HYPERVISOR}/build.sh ${KERNEL_VERSION}
@bash vmm/scripts/kernel/${HYPERVISOR}/build.sh ${KERNEL_VERSION}
@mkdir -p bin && cp vmm/scripts/kernel/${HYPERVISOR}/vmlinux.bin bin/vmlinux.bin && rm vmm/scripts/kernel/${HYPERVISOR}/vmlinux.bin

bin/kuasar.img:
@bash -x vmm/scripts/image/${GUESTOS_IMAGE}/build.sh image
@bash vmm/scripts/image/${GUESTOS_IMAGE}/build.sh image
@mkdir -p bin && cp /tmp/kuasar.img bin/kuasar.img && rm /tmp/kuasar.img

bin/kuasar.initrd:
@bash -x vmm/scripts/image/${GUESTOS_IMAGE}/build.sh initrd
@bash vmm/scripts/image/${GUESTOS_IMAGE}/build.sh initrd
@mkdir -p bin && cp /tmp/kuasar.initrd bin/kuasar.initrd && rm /tmp/kuasar.initrd

bin/wasm-sandboxer:
Expand Down
8 changes: 4 additions & 4 deletions vmm/scripts/image/centos/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ containerd)
--mount type=bind,src="${ROOTFS_DIR}",dst=/tmp/kuasar-rootfs,options=rbind:rw \
${IMAGE_NAME} \
${container_name} \
bash -x /kuasar/vmm/scripts/image/centos/build_rootfs.sh
bash /kuasar/vmm/scripts/image/centos/build_rootfs.sh
fn_check_result $? "ctr run ${container_name} return error!"
;;
docker)
Expand All @@ -80,7 +80,7 @@ docker)
-v "${REPO_DIR}":/kuasar \
-v "${ROOTFS_DIR}":"/tmp/kuasar-rootfs" \
${IMAGE_NAME} \
bash -x /kuasar/vmm/scripts/image/centos/build_rootfs.sh
bash /kuasar/vmm/scripts/image/centos/build_rootfs.sh
fn_check_result $? "docker run ${container_name} return error!"
;;
isulad)
Expand All @@ -93,7 +93,7 @@ isulad)
-v "${REPO_DIR}":/kuasar \
-v "${ROOTFS_DIR}":"/tmp/kuasar-rootfs" \
${IMAGE_NAME} \
bash -x /kuasar/vmm/scripts/image/centos/build_rootfs.sh
bash /kuasar/vmm/scripts/image/centos/build_rootfs.sh
fn_check_result $? "isula run ${container_name} return error!"
;;
*)
Expand All @@ -109,7 +109,7 @@ fi

case "$1" in
image)
bash -x ${REPO_DIR}/vmm/scripts/image/build_image.sh
bash ${REPO_DIR}/vmm/scripts/image/build_image.sh
fn_check_result $? "build image failed!"
;;
initrd)
Expand Down
2 changes: 2 additions & 0 deletions vmm/scripts/image/centos/build_rootfs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@

set -e

[ -n "${DEBUG}" ] && set -x

golang_version="1.20.5"
cert_file_path="/kuasar/proxy.crt"
ARCH=$(uname -m)
Expand Down

0 comments on commit b9ccea8

Please sign in to comment.