now installing files into the system

This commit is contained in:
2025-11-02 20:07:42 -03:00
parent aa98cd81b3
commit 22fb19a550

View File

@@ -7,6 +7,7 @@ import (
"runtime"
"strings"
"github.com/roboogg133/packets/pkg/install"
"github.com/roboogg133/packets/pkg/packet.lua.d"
"github.com/spf13/cobra"
)
@@ -92,11 +93,21 @@ var executeCmd = &cobra.Command{
fmt.Printf("error: %s", err.Error())
os.Exit(1)
}
pkg.ExecuteBuild(configs)
pkg.ExecuteInstall(configs)
os.Chdir(backupDir)
files, err := install.GetPackageFiles(configs.PacketDir)
if err != nil {
fmt.Printf("error: %s", err.Error())
os.Exit(1)
}
if err := install.InstallFiles(files, configs.PacketDir); err != nil {
fmt.Printf("error: %s", err.Error())
os.Exit(1)
}
}
},
}