filter out broken package
This commit is contained in:
parent
a59d90bf88
commit
cffd609181
@ -155,13 +155,12 @@ func repoAdd(path string, args string) {
|
|||||||
totalCount := len(files)
|
totalCount := len(files)
|
||||||
filePaths := ""
|
filePaths := ""
|
||||||
for _, file := range files {
|
for _, file := range files {
|
||||||
if count > 0 && totalCount > 0 && strings.TrimSpace(file) != "" {
|
if count > 0 && totalCount > 0 && strings.HasSuffix(file, ".deb") {
|
||||||
count--
|
count--
|
||||||
totalCount--
|
totalCount--
|
||||||
filePaths = filePaths + " " + path + file
|
filePaths = filePaths + " " + path + file
|
||||||
} else if strings.TrimSpace(filePaths) != "" {
|
} else if filePaths != "" {
|
||||||
count = 500
|
count = 500
|
||||||
fmt.Printf("Adding %s \n", filePaths)
|
|
||||||
cmd := exec.Command("/bin/bash", "-c", "reprepro "+args+" "+filePaths)
|
cmd := exec.Command("/bin/bash", "-c", "reprepro "+args+" "+filePaths)
|
||||||
out, err := cmd.CombinedOutput()
|
out, err := cmd.CombinedOutput()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user