flag.StringVar(&config.ProgramName,"program","hegel","The name of the program you are extracing binaries for. (eg tink-worker, hegel, tink-server, tink, boots)")
flag.StringVar(&config.OutDirectory,"out","./out","The directory that will be used to store the release binaries")
flag.StringVar(&config.Image,"image","docker://quay.io/tinkerbell/hegel","The image you want to download binaries from. It has to be a multi stage image.")
flag.StringVar(&config.Binary,"binary-to-copy","/usr/bin/hegel","The location of the binary you want to copy from inside the image.")
}
funcmain(){
flag.Parse()
println("Extracing binary: "+config.Binary)
println("From Image: "+config.Image)
imageR:=config.Image
binaryToCopy:=config.Binary
baseDir,err:=os.Getwd()
iferr!=nil{
log.Fatal(err)
}
programName:=config.ProgramName
outDir:=path.Join(baseDir,config.OutDirectory)
releaseDir:=path.Join(outDir,"release")
err=os.MkdirAll(releaseDir,0755)
iferr!=nil{
log.Fatal(err)
}
println("Binaries will be located in: "+releaseDir)