From b2fbacdc38429ccbfc8df89f5bd56370881ebac8 Mon Sep 17 00:00:00 2001 From: Renato Botelho Date: Mon, 29 Feb 2016 16:23:21 -0300 Subject: Save parameter in local variable --- tools/builder_common.sh | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) (limited to 'tools/builder_common.sh') diff --git a/tools/builder_common.sh b/tools/builder_common.sh index 16dbf62..2abf0b7 100644 --- a/tools/builder_common.sh +++ b/tools/builder_common.sh @@ -1172,13 +1172,15 @@ create_final_staging_area() { } customize_stagearea_for_image() { + local _image_type="$1" + # Prepare final stage area create_final_staging_area pkg_chroot_add ${FINAL_CHROOT_DIR} rc - if [ "${1}" = "nanobsd" -o \ - "${1}" = "nanobsd-vga" ]; then + if [ "${_image_type}" = "nanobsd" -o \ + "${_image_type}" = "nanobsd-vga" ]; then mkdir -p ${FINAL_CHROOT_DIR}/root/var/db \ ${FINAL_CHROOT_DIR}/root/var/cache \ @@ -1200,20 +1202,20 @@ customize_stagearea_for_image() { pkg_chroot_add ${FINAL_CHROOT_DIR} repo-devel fi - if [ "${1}" = "iso" -o \ - "${1}" = "memstick" -o \ - "${1}" = "memstickserial" -o \ - "${1}" = "memstickadi" ]; then + if [ "${_image_type}" = "iso" -o \ + "${_image_type}" = "memstick" -o \ + "${_image_type}" = "memstickserial" -o \ + "${_image_type}" = "memstickadi" ]; then install_bsdinstaller mkdir -p ${FINAL_CHROOT_DIR}/pkgs cp ${CORE_PKG_REAL_PATH}/All/*default-config*.txz ${FINAL_CHROOT_DIR}/pkgs fi - if [ "${1}" = "nanobsd" -o \ - "${1}" = "memstickserial" -o \ - "${1}" = "memstickadi" ]; then + if [ "${_image_type}" = "nanobsd" -o \ + "${_image_type}" = "memstickserial" -o \ + "${_image_type}" = "memstickadi" ]; then pkg_chroot_add ${FINAL_CHROOT_DIR} default-config-serial - elif [ "${1}" = "ova" ]; then + elif [ "${_image_type}" = "ova" ]; then pkg_chroot_add ${FINAL_CHROOT_DIR} default-config-vmware else pkg_chroot_add ${FINAL_CHROOT_DIR} default-config -- cgit v1.1