7 Star 1 Fork 7

BigSkySea / mkbshare

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
check_iso_mount.sh 776 Bytes
一键复制 编辑 原始数据 按行查看 历史
BigSkySea 提交于 2021-09-07 16:01 . update
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
1
https://gitee.com/BigSkySea/mkbshare.git
git@gitee.com:BigSkySea/mkbshare.git
BigSkySea
mkbshare
mkbshare
master

搜索帮助