Fork osext and support Solaris
This commit is contained in:
parent
174befe729
commit
8f9b8a8550
|
@ -5,11 +5,6 @@
|
||||||
"./cmd/..."
|
"./cmd/..."
|
||||||
],
|
],
|
||||||
"Deps": [
|
"Deps": [
|
||||||
{
|
|
||||||
"ImportPath": "bitbucket.org/kardianos/osext",
|
|
||||||
"Comment": "null-13",
|
|
||||||
"Rev": "5d3ddcf53a508cc2f7404eaebf546ef2cb5cdb6e"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"ImportPath": "code.google.com/p/go.crypto/bcrypt",
|
"ImportPath": "code.google.com/p/go.crypto/bcrypt",
|
||||||
"Comment": "null-216",
|
"Comment": "null-216",
|
||||||
|
@ -39,6 +34,10 @@
|
||||||
"ImportPath": "github.com/bkaradzic/go-lz4",
|
"ImportPath": "github.com/bkaradzic/go-lz4",
|
||||||
"Rev": "93a831dcee242be64a9cc9803dda84af25932de7"
|
"Rev": "93a831dcee242be64a9cc9803dda84af25932de7"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "github.com/calmh/osext",
|
||||||
|
"Rev": "9bf61584e5f1f172e8766ddc9022d9c401faaa5e"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "github.com/calmh/xdr",
|
"ImportPath": "github.com/calmh/xdr",
|
||||||
"Rev": "a597b63b87d6140f79084c8aab214b4d533833a1"
|
"Rev": "a597b63b87d6140f79084c8aab214b4d533833a1"
|
||||||
|
|
|
@ -2,12 +2,13 @@
|
||||||
// Use of this source code is governed by a BSD-style
|
// Use of this source code is governed by a BSD-style
|
||||||
// license that can be found in the LICENSE file.
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
// +build linux netbsd openbsd
|
// +build linux netbsd openbsd solaris
|
||||||
|
|
||||||
package osext
|
package osext
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"errors"
|
"errors"
|
||||||
|
"fmt"
|
||||||
"os"
|
"os"
|
||||||
"runtime"
|
"runtime"
|
||||||
)
|
)
|
||||||
|
@ -20,6 +21,8 @@ func executable() (string, error) {
|
||||||
return os.Readlink("/proc/curproc/exe")
|
return os.Readlink("/proc/curproc/exe")
|
||||||
case "openbsd":
|
case "openbsd":
|
||||||
return os.Readlink("/proc/curproc/file")
|
return os.Readlink("/proc/curproc/file")
|
||||||
|
case "solaris":
|
||||||
|
return os.Readlink(fmt.Sprintf("/proc/%d/path/a.out", os.Getpid()))
|
||||||
}
|
}
|
||||||
return "", errors.New("ExecPath not implemented for " + runtime.GOOS)
|
return "", errors.New("ExecPath not implemented for " + runtime.GOOS)
|
||||||
}
|
}
|
|
@ -10,7 +10,7 @@ import (
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"bitbucket.org/kardianos/osext"
|
"github.com/calmh/osext"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Release struct {
|
type Release struct {
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
// All rights reserved. Use of this source code is governed by an MIT-style
|
// All rights reserved. Use of this source code is governed by an MIT-style
|
||||||
// license that can be found in the LICENSE file.
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
// +build !solaris,!windows,!noupgrade
|
// +build !windows,!noupgrade
|
||||||
|
|
||||||
package upgrade
|
package upgrade
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
// All rights reserved. Use of this source code is governed by an MIT-style
|
// All rights reserved. Use of this source code is governed by an MIT-style
|
||||||
// license that can be found in the LICENSE file.
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
// +build solaris noupgrade
|
// +build noupgrade
|
||||||
|
|
||||||
package upgrade
|
package upgrade
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue