mirror of
https://github.com/bin456789/reinstall.git
synced 2025-01-19 04:49:13 +08:00
opensuse: 不输入版本号时改成安装 tumbleweed
This commit is contained in:
parent
fc3d82ab16
commit
1604af1dac
11
reinstall.sh
11
reinstall.sh
@ -549,16 +549,9 @@ verify_os_name() {
|
|||||||
if [ -n "$finalos" ]; then
|
if [ -n "$finalos" ]; then
|
||||||
distro=$(echo $finalos | cut -d: -f1)
|
distro=$(echo $finalos | cut -d: -f1)
|
||||||
releasever=$(echo $finalos | cut -d: -f2)
|
releasever=$(echo $finalos | cut -d: -f2)
|
||||||
if [ -z "$releasever" ]; then
|
|
||||||
# 默认版本号
|
# 默认版本号
|
||||||
if grep -q '|' <<<$os; then
|
if [ -z "$releasever" ] && grep -q '|' <<<$os; then
|
||||||
if [ "$distro" = opensuse ]; then
|
releasever=$(awk '{print $2}' <<<$os | awk -F'|' '{print $NF}')
|
||||||
field='NF-1'
|
|
||||||
else
|
|
||||||
field='NF'
|
|
||||||
fi
|
|
||||||
releasever=$(awk '{print $2}' <<<$os | awk -F'|' "{print \$($field)}")
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
Loading…
x
Reference in New Issue
Block a user