Merge pull request #31 from davidnewhall/dn2_changes
Dont include pngs in package. Fix version output. Lint slice.
This commit is contained in:
commit
83ce3b988e
|
|
@ -104,7 +104,7 @@ package_build_osx: man macos
|
|||
cp $(BINARY).macos $@/usr/local/bin/$(BINARY)
|
||||
cp *.1.gz $@/usr/local/share/man/man1
|
||||
cp examples/*.conf.example $@/usr/local/etc/$(BINARY)/
|
||||
cp examples/* $@/usr/local/share/doc/$(BINARY)/
|
||||
cp examples/{*dash.json,up.conf.example} $@/usr/local/share/doc/$(BINARY)/
|
||||
cp init/launchd/com.github.davidnewhall.$(BINARY).plist $@/Library/LaunchAgents/
|
||||
|
||||
# Build an environment that can be packaged for linux.
|
||||
|
|
@ -117,7 +117,7 @@ package_build_linux: man linux
|
|||
cp *.1.gz $@/usr/share/man/man1
|
||||
cp examples/*.conf.example $@/etc/$(BINARY)/
|
||||
cp examples/up.conf.example $@/etc/$(BINARY)/up.conf
|
||||
cp examples/* $@/usr/share/doc/$(BINARY)/
|
||||
cp examples/{*dash.json,up.conf.example} $@/usr/share/doc/$(BINARY)/
|
||||
cp init/systemd/$(BINARY).service $@/lib/systemd/system/
|
||||
|
||||
check_fpm:
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@ func parseFlags() string {
|
|||
configFile := flag.StringP("config", "c", defaultConfFile, "Poller Config File (TOML Format)")
|
||||
version := flag.BoolP("version", "v", false, "Print the version and exit")
|
||||
if flag.Parse(); *version {
|
||||
fmt.Println("unifi-poller version:", Version)
|
||||
fmt.Printf("unifi-poller v%s\n", Version)
|
||||
os.Exit(0) // don't run anything else.
|
||||
}
|
||||
return *configFile
|
||||
|
|
@ -92,7 +92,7 @@ func (c *Config) CheckSites(controller *unifi.Unifi) error {
|
|||
return err
|
||||
}
|
||||
if !c.Quiet {
|
||||
msg := make([]string, 0)
|
||||
msg := []string{}
|
||||
for _, site := range sites {
|
||||
msg = append(msg, site.Name+" ("+site.Desc+")")
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue