+rootfs_dir=${os}/${os_arch}/${os_version}
the path is fixed rootfs_dir=/srv/os/${os}/${os_arch}/${os_version} mkdir -p rootfs_dir
ok
+download_os_rootfs() +{
mkdir -p /srv/os/${rootfs_dir}
cd /srv/os/$rootfs_dir
download_url="http://api.compass-ci.openeuler.org:${SRV_HTTP_PORT}/os/${rootfs_dir}.cgz"
no need download use url directly?
no, here will use url also: log_error "failed to download os rootfs: $download_url"
wget $download_url
wget --timestamping --progress=bar:force $url
uncecessary, os rootfs no need to download repeated download.
Thanks, Yinsi
Thanks, Shenwei
[ "$?" -ne 0 ] && {
exit 1
}
gzip -dc ${os_version}.cgz | cpio -id
rm -rf ${os_version}.cgz
+}
+download_os_rootfs
2.23.0