diff --git a/git_clean.sh b/git_clean.sh new file mode 100644 index 0000000..36ac39b --- /dev/null +++ b/git_clean.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +cd "$1" && git clean -xdff \ No newline at end of file diff --git a/main.go b/main.go index c4f1c23..59ddf6d 100644 --- a/main.go +++ b/main.go @@ -219,7 +219,7 @@ func increasePkgRel(pkg *BuildPackage) { } func gitClean(pkg *BuildPackage) { - cmd := backgroundCmd("sudo", "git clean -xff "+filepath.Dir(pkg.Pkgbuild)) + cmd := backgroundCmd("sudo", "git_clean.sh "+filepath.Dir(pkg.Pkgbuild)) res, err := cmd.CombinedOutput() if err != nil { log.Warningf("git clean failed with %v:\n%s", err, res) @@ -587,7 +587,7 @@ func (b *BuildManager) syncWorker() { log.Debug(string(res)) check(err) } else if err == nil { - cmd := backgroundCmd("sudo", "git clean -xff "+gitPath) + cmd := backgroundCmd("sudo", "git_clean.sh "+gitPath) res, err := cmd.CombinedOutput() log.Debug(string(res)) check(err)