filter out broken package

This commit is contained in:
ferrreo 2023-09-05 19:58:16 +01:00
parent a59d90bf88
commit cffd609181
2 changed files with 2 additions and 3 deletions

BIN
ppp

Binary file not shown.

View File

@ -155,13 +155,12 @@ func repoAdd(path string, args string) {
totalCount := len(files)
filePaths := ""
for _, file := range files {
if count > 0 && totalCount > 0 && strings.TrimSpace(file) != "" {
if count > 0 && totalCount > 0 && strings.HasSuffix(file, ".deb") {
count--
totalCount--
filePaths = filePaths + " " + path + file
} else if strings.TrimSpace(filePaths) != "" {
} else if filePaths != "" {
count = 500
fmt.Printf("Adding %s \n", filePaths)
cmd := exec.Command("/bin/bash", "-c", "reprepro "+args+" "+filePaths)
out, err := cmd.CombinedOutput()
if err != nil {