main/stripExts: simplify implementation

See: #6
This commit is contained in:
Clayton Craft
2021-09-03 22:31:45 -07:00
parent 7bf5ce967f
commit 001baa29bf

View File

@@ -611,13 +611,7 @@ func generateInitfsExtra(name string, path string, devinfo deviceinfo.DeviceInfo
}
func stripExts(file string) string {
for {
if filepath.Ext(file) == "" {
break
}
file = strings.TrimSuffix(file, filepath.Ext(file))
}
return file
return strings.Split(file, ".")[0]
}
func getModulesInDir(files misc.StringSet, modPath string) error {