2
2
mirror of https://github.com/octoleo/restic.git synced 2024-11-25 06:07:44 +00:00

helper: don't setup cmd paths twice

This commit is contained in:
Michael Eischer 2022-08-20 12:09:42 +02:00
parent 0d9ac78437
commit e530d422a0

View File

@ -103,7 +103,6 @@ func build(sourceDir, outputDir, goos, goarch string) (filename string) {
)
c.Stdout = os.Stdout
c.Stderr = os.Stderr
c.Dir = sourceDir
verbose("run %v %v in %v", "go", c.Args, c.Dir)
@ -151,11 +150,9 @@ func compress(goos, inputDir, filename string) (outputFile string) {
case "windows":
outputFile = strings.TrimSuffix(filename, ".exe") + ".zip"
c = exec.Command("zip", "-q", "-X", outputFile, filename)
c.Dir = inputDir
default:
outputFile = filename + ".bz2"
c = exec.Command("bzip2", filename)
c.Dir = inputDir
}
rm(filepath.Join(inputDir, outputFile))