代码拉取完成,页面将自动刷新
function get_repose()
{
expect -c "
spawn $*
expect {
\"*yes/no*\" {send \"yes\n\"}
eof
}
catch wait result;
exit [lindex \$result 3]
"
}
function get_latest()
{
# release iso path
release_path=$1
key_file=$2
echo $(get_repose ssh -i ${key_file} root@121.36.84.172 ls -lt ${release_path} | grep -v test | grep -v total | head -n 1 | awk '{print $9}')
}
function get_mount_iso()
{
# path of iso should be mounted on
iso_mount_dir=$1
echo `mount | grep ${iso_mount_dir} | awk '{print $1}'`
}
latest=$(get_latest "/repo/openeuler/dailybuild/openEuler-21.09" "~/super_publish_rsa")
echo $latest
exit 0
res=$(get_mount_iso "$latest/OS/aarch64")
if [[ $res ]];then
echo $res
else
echo "Not find"
fi
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。