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