git-lfs/git-lfs.go
Sebastian Schuberth 87d0037f23 Specify the embedded Windows icon as part of versioninfo.json
As of [1] goversioninfo supports specifying the icon to embed as part of
versioninfo.json. Use that new mechanism for consistency with specifying
other meta-data fields.

[1] https://github.com/josephspurrier/goversioninfo/pull/17
2017-12-05 09:49:14 +01:00

38 lines
555 B
Go

//go:generate goversioninfo
package main
import (
"fmt"
"os"
"os/signal"
"sync"
"syscall"
"github.com/git-lfs/git-lfs/commands"
)
func main() {
c := make(chan os.Signal)
signal.Notify(c, os.Interrupt, os.Kill)
var once sync.Once
go func() {
for {
sig := <-c
once.Do(commands.Cleanup)
fmt.Fprintf(os.Stderr, "\nExiting because of %q signal.\n", sig)
exitCode := 1
if sysSig, ok := sig.(syscall.Signal); ok {
exitCode = int(sysSig)
}
os.Exit(exitCode + 128)
}
}()
commands.Run()
once.Do(commands.Cleanup)
}