summaryrefslogtreecommitdiff
path: root/stateWindow.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-02-11 13:56:59 -0600
committerJeff Carr <[email protected]>2024-02-11 13:56:59 -0600
commit0322b3ad856345c1e3c848e06c8d27caee6856af (patch)
treea32575c22a298ea1d4919c2a8802cd2b8df2194f /stateWindow.go
parente4e12ae90dd2f9775b1d45c1d083a4e44817a655 (diff)
builds automatically
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'stateWindow.go')
-rw-r--r--stateWindow.go16
1 files changed, 12 insertions, 4 deletions
diff --git a/stateWindow.go b/stateWindow.go
index efe9a8a..9f9f166 100644
--- a/stateWindow.go
+++ b/stateWindow.go
@@ -5,6 +5,7 @@ package main
import (
"fmt"
"os"
+ "path/filepath"
"strings"
"go.wit.com/lib/gadgets"
@@ -125,15 +126,22 @@ func (c *controlBox) buildPackage() bool {
return false
}
- shell.Run([]string{"dpkg-deb", "--build", "files", debname})
- if shell.Exists(debname) {
+ homeDir, err := os.UserHomeDir()
+ if err != nil {
+ log.Warn("os.UserHomeDir() failed")
+ return false
+ }
+
+ fulldebname := filepath.Join(homeDir, "incoming", debname)
+ shell.Run([]string{"dpkg-deb", "--build", "files", fulldebname})
+ if shell.Exists(fulldebname) {
log.Warn("build worked")
} else {
log.Warn("build failed")
return false
}
- shell.Run([]string{"dpkg-deb", "-I", debname})
- shell.Run([]string{"dpkg-deb", "-c", debname})
+ shell.Run([]string{"dpkg-deb", "-I", fulldebname})
+ shell.Run([]string{"dpkg-deb", "-c", fulldebname})
return true
}