Added conditional compilation for each OS
This commit is contained in:
parent
0e005d22ce
commit
1a895aa360
3 changed files with 36 additions and 0 deletions
|
@ -4,6 +4,7 @@ import (
|
|||
"path/filepath"
|
||||
"strings"
|
||||
|
||||
"git.akyoto.dev/cli/q/src/config"
|
||||
"git.akyoto.dev/cli/q/src/fs"
|
||||
)
|
||||
|
||||
|
@ -20,6 +21,14 @@ func (s *Scanner) queueDirectory(directory string, pkg string) {
|
|||
return
|
||||
}
|
||||
|
||||
if strings.HasSuffix(name, "_linux.q") && config.TargetOS != "linux" {
|
||||
return
|
||||
}
|
||||
|
||||
if strings.HasSuffix(name, "_mac.q") && config.TargetOS != "mac" {
|
||||
return
|
||||
}
|
||||
|
||||
fullPath := filepath.Join(directory, name)
|
||||
s.queueFile(fullPath, pkg)
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue