File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed
core/tabs/applications-setup/virtualization Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -54,8 +54,7 @@ virtualBoxPermissions() {
54
54
55
55
getLatestVersion () {
56
56
vboxGitVersion=$( wget " https://raw.githubusercontent.com/VirtualBox/virtualbox/refs/heads/main/Version.kmk" -q -O -)
57
- fullVersion=$( echo " $vboxGitVersion " | sed ' /^#/d' | cut -d' =' -f2 | cut -d' $' -f1 | xargs | sed ' s/ /./g' )
58
- version=$( sed ' s/.\{2\}$//' <<< " $fullVersion" )
57
+ version=$( echo " $vboxGitVersion " | sed ' /^#/d' | cut -d' =' -f2 | cut -d' $' -f1 | xargs | sed ' s/ /./g' | cut -c -3)
59
58
}
60
59
61
60
checkVirtualBox () {
@@ -65,7 +64,7 @@ checkVirtualBox() {
65
64
currentVersion=$( vboxmanage --version | cut -d' r' -f1)
66
65
getLatestVersion
67
66
68
- if [ " $( echo " $ {currentVersion% .* }" ) " = " $fullVersion " ]; then
67
+ if [ " ${currentVersion% .* } " = " $version " ]; then
69
68
printf " %b\n" " Latest version of VirtualBox already installed"
70
69
else
71
70
installVirtualBox
You can’t perform that action at this time.
0 commit comments