Source compilation will now use fakeroot and added a skip check flag

This commit is contained in:
2024-07-01 12:10:21 +03:00
parent e72aa2320d
commit 9cbc36f869
3 changed files with 112 additions and 47 deletions
+25
View File
@@ -1,6 +1,8 @@
package bpm_utils
import (
"io"
"os"
"os/exec"
"strings"
)
@@ -13,6 +15,29 @@ func GetArch() string {
return strings.TrimSpace(string(output))
}
func copyFileContents(src, dst string) (err error) {
in, err := os.Open(src)
if err != nil {
return
}
defer in.Close()
out, err := os.Create(dst)
if err != nil {
return
}
defer func() {
cerr := out.Close()
if err == nil {
err = cerr
}
}()
if _, err = io.Copy(out, in); err != nil {
return
}
err = out.Sync()
return
}
func stringSliceRemove(s []string, r string) []string {
for i, v := range s {
if v == r {