summaryrefslogtreecommitdiff
path: root/buildPackage.go
diff options
context:
space:
mode:
Diffstat (limited to 'buildPackage.go')
-rw-r--r--buildPackage.go12
1 files changed, 8 insertions, 4 deletions
diff --git a/buildPackage.go b/buildPackage.go
index 95c76bb..bf201c3 100644
--- a/buildPackage.go
+++ b/buildPackage.go
@@ -81,7 +81,7 @@ func (c *controlBox) buildPackage() (bool, error) {
// add any flags from the command line
for _, flag := range argv.Ldflags {
- cmd = append(cmd, "-ldflags", "-X " + flag)
+ cmd = append(cmd, "-ldflags", "-X "+flag)
}
if shell.Run(cmd) {
@@ -174,9 +174,13 @@ func (c *controlBox) buildPackage() (bool, error) {
// cleanup files
if shell.Exists("files") {
- if shell.Run([]string{"rm", "-rf", "files"}) {
- log.Warn("rm failed")
- return false, errors.New("rm files/")
+ if argv.KeepFiles {
+ log.Info("keeping the build files/")
+ } else {
+ if shell.Run([]string{"rm", "-rf", "files"}) {
+ log.Warn("rm failed")
+ return false, errors.New("rm files/")
+ }
}
}
return true, nil