Align build scripts to LF
[ta/build-tools.git] / build_step_create_install_cd.sh
index 40de1cc..82a5cbf 100755 (executable)
@@ -23,16 +23,14 @@ _read_manifest_vars
 tmp=$WORKTMP/install_cd
 iso_build_dir=$tmp/build
 
-input_image="$WORKTMP/goldenimage/${GOLDEN_IMAGE_NAME}"
-output_image_path="$1"
-[[ $output_image_path =~ ^/ ]] || output_image_path=$(pwd)/$output_image_path
-output_bootcd_path="$2"
-[[ $output_bootcd_path =~ ^/ ]] || output_bootcd_path=$(pwd)/$output_bootcd_path
+input_image=$(readlink -f ${1:-$WORKTMP/goldenimage/$GOLDEN_IMAGE_NAME})
+output_image_path=${2:-$RESULT_IMAGES_DIR/install.iso}
+output_bootcd_path=${3:-$RESULT_IMAGES_DIR/bootcd.iso}
 mkdir -p $tmp
 rm -rf $iso_build_dir
 mkdir -p $iso_build_dir
 
-reposnap_base=$(_read_build_config DEFAULT centos_reposnap_base)
+reposnap_base=$(_read_build_config DEFAULT centos_reposnap)
 release_version=$PRODUCT_RELEASE_LABEL
 reposnap_base_dir="${reposnap_base}/os/x86_64/"
 iso_image_label=$(_read_build_config DEFAULT iso_image_label)
@@ -44,13 +42,6 @@ remove_extra_slashes_from_url() {
   echo $1 | sed -re 's#([^:])//+#\1/#g'
 }
 
-get_nexus() {
- $scriptdir/nexus3_dl.sh \
-    $nexus_url \
-    $(basename $nexus_reposnaps) \
-    ${reposnap_base#$nexus_reposnaps/}/os/x86_64 $@
-}
-
 wget_dir() {
   local url=$1
   echo $url | grep -q /$ || _abort "wget path '$url' must end with slash for recursive wget"
@@ -64,19 +55,11 @@ wget_dir() {
 pushd $iso_build_dir
 
 # Get files needed for generating CD image.
-if echo $reposnap_base_dir | grep -E "https?://nexus3"; then
-  nexus_url=$(_read_build_config DEFAULT nexus_url)
-  nexus_reposnaps=$(_read_build_config DEFAULT nexus_reposnaps)
-  get_nexus "EFI/BOOT" "EFI/BOOT/fonts"
-  get_nexus "images:*efiboot.img" "images/pxeboot"
-  get_nexus "isolinux"
-else
-  wget_dir ${cd_efi_dir}/
-  wget_dir ${cd_images_dir}/
-  rm -rf images/boot.iso
-  sync
-  wget_dir ${cd_isolinux_dir}/
-fi
+wget_dir ${cd_efi_dir}/
+wget_dir ${cd_images_dir}/
+rm -rf images/boot.iso
+sync
+wget_dir ${cd_isolinux_dir}/
 chmod +w -R isolinux/ EFI/ images/
 
 if [ -e $scriptdir/isolinux/isolinux.cfg ]; then
@@ -105,7 +88,7 @@ cp -fp boot/initrd-provisioning.img $iso_build_dir/isolinux/initrd.img
 rm -rf boot/
 
 echo "Generating boot iso"
-_run_cmd genisoimage  -U -r -v -T -J -joliet-long \
+genisoimage  -U -r -v -T -J -joliet-long \
   -V "${release_version}" -A "${release_version}" -P ${iso_image_label} \
   -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 \
   -boot-info-table -eltorito-alt-boot -e images/efiboot.img -no-emul-boot \
@@ -118,12 +101,12 @@ cp -f ${input_image} $iso_build_dir/
 mkdir -p $iso_build_dir/rpms
 
 echo "Generating product iso"
-_run_cmd genisoimage  -U -r -v -T -J -joliet-long \
+genisoimage  -U -r -v -T -J -joliet-long \
   -V "${release_version}" -A "${release_version}" -P ${iso_image_label} \
   -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 \
   -boot-info-table -eltorito-alt-boot -e images/efiboot.img -no-emul-boot \
   -o release.iso $iso_build_dir
-_run_cmd isohybrid $tmp/release.iso
+isohybrid $tmp/release.iso
 _publish_image $tmp/release.iso $output_image_path
 
 echo "Clean up to preserve workspace footprint"