Permalink
Browse files

Update main

  • Loading branch information...
zachhuff386 committed Jul 27, 2015
1 parent e5315c6 commit d3bd5bc660a82589dcfd715051c183488232169d
Showing with 2 additions and 43 deletions.
  1. +2 −43 main.go
View
45 main.go
@@ -1,52 +1,11 @@
package main
import (
"flag"
"github.com/pacur/pacur/builder"
"github.com/pacur/pacur/packer"
"github.com/pacur/pacur/parse"
"strings"
"github.com/pacur/pacur/cmd"
)
func main() {
flag.Parse()
split := strings.Split(flag.Arg(0), "-")
distro := split[0]
release := ""
if len(split) > 1 {
release = split[1]
}
pac, err := parse.File("/pacur")
if err != nil {
panic(err)
}
err = pac.Compile()
if err != nil {
panic(err)
}
pcker, err := packer.GetPacker(pac, distro, release)
if err != nil {
panic(err)
}
err = pcker.Prep()
if err != nil {
panic(err)
}
builder := builder.Builder{
Pack: pac,
}
err = builder.Build()
if err != nil {
panic(err)
}
err = pcker.Build()
err := cmd.Parse()
if err != nil {
panic(err)
}

0 comments on commit d3bd5bc

Please sign in to comment.