fix up numbering

This commit is contained in:
Mark McGranaghan 2012-09-29 13:31:34 -07:00
parent d9063c80e3
commit 2f5c430878
3 changed files with 8 additions and 1 deletions

View File

@ -27,7 +27,7 @@ func main() {
if dirErr != nil { if dirErr != nil {
panic(dirErr) panic(dirErr)
} }
baseTrimmer, _ := regexp.Compile("[0-9x]+-") baseTrimmer, _ := regexp.Compile("^[0-9x]+-")
for _, fi := range fileInfos { for _, fi := range fileInfos {
baseName := baseTrimmer.ReplaceAllString(fi.Name(), "") baseName := baseTrimmer.ReplaceAllString(fi.Name(), "")
sourceNames = append(sourceNames, baseName) sourceNames = append(sourceNames, baseName)
@ -56,6 +56,13 @@ func main() {
} }
os.Exit(1) os.Exit(1)
} }
for _, indexName := range indexNames {
_, ok := sourceMap[indexName]
if !ok {
fmt.Printf("%s\n", indexName)
os.Exit(1)
}
}
// rename some stuff // rename some stuff
for index, indexName := range indexNames { for index, indexName := range indexNames {