On Thu, Nov 19, 2020 at 08:40:28PM +0800, Yu Chuan wrote:
[Why]
- Decouple the code related to dailybuild.
The 'iso_url_file' field is only relate to the dailybuild function, and this field is unnecessary when user only want generate a rootfs from offical distribution.
But now if this field is none, this job will failed.
- Modify the field name.
'iso_url_file' -> 'dailybuild_iso_url_file'.
[Addition] if the `iso_url_file` field exists, this job will generate a soft link which point to the result rootfs.
- soft link name: {iso_version}-dailybuild.
symbolic link
local pub_ip=$(echo "${dailybuild_iso_url_file}" | grep -oEw "[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}")
ISO_URL="$(curl "${dailybuild_iso_url_file}" |sed -r "s/[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}/${pub_ip}/g")"
^ | sed -r
- [ -n "${dailybuild_iso_url_file}" ] || return 0
add blank line here
Thanks, Wang Yong
- local i2q_iso_url_file="${I2Q_SRC}/conf/iso/net-iso/${iso_os}/${iso_arch}/${iso_version}"
- sed -i "s|^iso_url=.*|iso_url="${ISO_URL}"|g" "${i2q_iso_url_file}"
- sed -i "s|^iso_checksum_url=.*|iso_checksum_url="${ISO_CHECKSUM_URL}"|g" "${i2q_iso_url_file}"