Add Separate tree for build dependency

Reuse the Recipe and extend it to read a separate tree for build
dependencies.

Also add accessors to compilespec to produce dockerfile image format.
This commit is contained in:
Ettore Di Giacinto
2019-11-05 17:36:22 +01:00
parent f570f74a9e
commit ff88ff67c2
7 changed files with 254 additions and 12 deletions

View File

@@ -15,7 +15,10 @@
package helpers
import "os"
import (
"io/ioutil"
"os"
)
// Exists reports whether the named file or directory exists.
func Exists(name string) bool {
@@ -26,3 +29,11 @@ func Exists(name string) bool {
}
return true
}
func Read(file string) (string, error) {
dat, err := ioutil.ReadFile(file)
if err != nil {
return "", err
}
return string(dat), nil
}