This commit is contained in:
Jeff Carr 2024-12-18 18:11:57 -06:00
parent 5694d40fa3
commit d16f36fe56
1 changed files with 3 additions and 3 deletions

View File

@ -138,10 +138,10 @@ func (c *controlBox) buildPackage() (bool, error) {
log.Warn("rm failed. files/ still exists. is golang doing these in parallel?")
return false, errors.New("rm files/")
}
if !shell.Mkdir("files/DEBIAN") {
if err := os.MkdirAll("files/DEBIAN", os.ModePerm); err != nil {
return false, errors.New("mkdir files/DEBIAN")
}
if !shell.Mkdir("files/usr/bin") {
if err := os.MkdirAll("files/usr/bin", os.ModePerm); err != nil {
log.Warn("mkdir failed")
return false, errors.New("mkdir files/usr/bin")
}
@ -170,7 +170,7 @@ func (c *controlBox) buildPackage() (bool, error) {
if readme != "" {
path := filepath.Join("files/usr/lib/" + filename)
if !shell.Mkdir(path) {
if err := os.MkdirAll(path, os.ModePerm); err != nil {
return false, errors.New("no files/usr/lib")
}
if r := shell.Run([]string{"cp", readme, path}); r.Error != nil {