Skip to content

Commit

Permalink
Added new function to check if the main kernel is selected yet
Browse files Browse the repository at this point in the history
  • Loading branch information
Fulgurance committed Feb 16, 2025
1 parent 2f64108 commit 1c09766
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
8 changes: 8 additions & 0 deletions ISM/CommandLine.cr
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,14 @@ module ISM
exitProgram
end

def kernelIsSelected
return selectedKernel.isValid

rescue error
printSystemCallErrorNotification(error)
exitProgram
end

def inputMatchWithFilter(input : String, filter : Regex | Array(Regex))
if filter.is_a?(Array(Regex))
userInput = input.split(" ")
Expand Down
10 changes: 9 additions & 1 deletion ISM/Software.cr
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ module ISM
def updateKernelSymlinks

#Create/Update symlinks if needed
if !selectedKernel || isCurrentKernel
if !kernelIsSelected || isCurrentKernel
#Make link for the current running kernel sources
makeLink( target: "#{@information.versionName.downcase}",
path: "#{builtSoftwareDirectoryPathNoChroot}#{Ism.settings.rootPath}/usr/src/main-kernel-sources",
Expand Down Expand Up @@ -269,6 +269,14 @@ module ISM
Ism.exitProgram
end

def kernelIsSelected
return Ism.kernelIsSelected

rescue error
Ism.printSystemCallErrorNotification(error)
Ism.exitProgram
end

def download
Ism.notifyOfDownload(@information)

Expand Down

0 comments on commit 1c09766

Please sign in to comment.