forked from Plemya-x/ALR
		
	fix: add auto_req and auto_prov
This commit is contained in:
		| @@ -25,12 +25,12 @@ import ( | ||||
| 	"strings" | ||||
|  | ||||
| 	"github.com/mitchellh/mapstructure" | ||||
| 	"plemya-x.ru/alr/internal/overrides" | ||||
| 	"plemya-x.ru/alr/pkg/distro" | ||||
| 	"golang.org/x/exp/slices" | ||||
| 	"mvdan.cc/sh/v3/expand" | ||||
| 	"mvdan.cc/sh/v3/interp" | ||||
| 	"mvdan.cc/sh/v3/syntax" | ||||
| 	"plemya-x.ru/alr/internal/overrides" | ||||
| 	"plemya-x.ru/alr/pkg/distro" | ||||
| ) | ||||
|  | ||||
| var ErrNotPointerToStruct = errors.New("val must be a pointer to a struct") | ||||
| @@ -221,3 +221,8 @@ func (d *Decoder) getVar(name string) *expand.Variable { | ||||
| 	} | ||||
| 	return nil | ||||
| } | ||||
|  | ||||
| func IsTruthy(value string) bool { | ||||
| 	value = strings.ToLower(strings.TrimSpace(value)) | ||||
| 	return value == "true" || value == "yes" || value == "1" | ||||
| } | ||||
|   | ||||
| @@ -49,6 +49,8 @@ type BuildVars struct { | ||||
| 	Checksums     []string `sh:"checksums"` | ||||
| 	Backup        []string `sh:"backup"` | ||||
| 	Scripts       Scripts  `sh:"scripts"` | ||||
| 	AutoReq       []string `sh:"auto_req"` | ||||
| 	AutoProv      []string `sh:"auto_prov"` | ||||
| } | ||||
|  | ||||
| type Scripts struct { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user