+# example usage: +# ./download-rootfs debian aarch64 sid
the usage support diff type os
but i can't find where do you accept these parameters?
yes, i will add export.
Thanks, Yinsi
os=$1 os_arch=$2 xxx
Thanks, Shenwei
+: ${os:=openeuler} +: ${os_arch:=aarch64} +: ${os_version:=20.03}
+. ${CCI_SRC}/container/defconfig.sh +. ${CCI_SRC}/lib/log.sh
+load_cci_defaults
+rootfs_dir=/${os}/${os_arch}/${os_version}
+download_os_rootfs() +{
- mkdir -p /srv/os/${rootfs_dir}
- cd /srv/os/$rootfs_dir || exit
- download_url="http://api.compass-ci.openeuler.org:$%7BSRV_HTTP_PORT%7D/os/$%7Brootfs_dir%7..."
- wget $download_url
- [ "$?" -ne 0 ] && {
log_error "failed to download os rootfs: $download_url"
exit 1
- }
- gzip -dc ${os_version}.cgz | cpio -id
- rm -rf ${os_version}.cgz
+}
+download_os_rootfs
2.23.0