mirror of
https://github.com/ipfs/kubo.git
synced 2025-07-01 19:24:14 +08:00
Merge pull request #820 from jbenet/newOSEXTimport
updated inconshreveable/go-update
This commit is contained in:
11
Godeps/Godeps.json
generated
11
Godeps/Godeps.json
generated
@ -9,11 +9,6 @@
|
||||
"ImportPath": "bazil.org/fuse",
|
||||
"Rev": "d62a1291477b51b24becf4def173bd843138c4b6"
|
||||
},
|
||||
{
|
||||
"ImportPath": "bitbucket.org/kardianos/osext",
|
||||
"Comment": "null-15",
|
||||
"Rev": "44140c5fc69ecf1102c5ef451d73cd98ef59b178"
|
||||
},
|
||||
{
|
||||
"ImportPath": "code.google.com/p/go-uuid/uuid",
|
||||
"Comment": "null-12",
|
||||
@ -139,7 +134,7 @@
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/inconshreveable/go-update",
|
||||
"Rev": "221d034a558b4c21b0624b2a450c076913854a57"
|
||||
"Rev": "68f5725818189545231c1fd8694793d45f2fc529"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/jackpal/go-nat-pmp",
|
||||
@ -211,6 +206,10 @@
|
||||
"ImportPath": "github.com/jbenet/goprocess",
|
||||
"Rev": "b4efc4c8775f0250710b39bfa716276ca10f85af"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/kardianos/osext",
|
||||
"Rev": "ccfcd0245381f0c94c68f50626665eed3c6b726a"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/kr/binarydist",
|
||||
"Rev": "9955b0ab8708602d411341e55fffd7e0700f86bd"
|
||||
|
2
Godeps/_workspace/src/github.com/inconshreveable/go-update/check/check.go
generated
vendored
2
Godeps/_workspace/src/github.com/inconshreveable/go-update/check/check.go
generated
vendored
@ -10,8 +10,8 @@ import (
|
||||
"net/http"
|
||||
"runtime"
|
||||
|
||||
"github.com/jbenet/go-ipfs/Godeps/_workspace/src/bitbucket.org/kardianos/osext"
|
||||
"github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/inconshreveable/go-update"
|
||||
"github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/kardianos/osext"
|
||||
)
|
||||
|
||||
type Initiative string
|
||||
|
7
Godeps/_workspace/src/github.com/inconshreveable/go-update/update.go
generated
vendored
7
Godeps/_workspace/src/github.com/inconshreveable/go-update/update.go
generated
vendored
@ -113,7 +113,6 @@ while outputting a progress meter and supports resuming partial downloads.
|
||||
package update
|
||||
|
||||
import (
|
||||
"github.com/jbenet/go-ipfs/Godeps/_workspace/src/bitbucket.org/kardianos/osext"
|
||||
"bytes"
|
||||
"crypto"
|
||||
"crypto/rsa"
|
||||
@ -122,12 +121,14 @@ import (
|
||||
"crypto/x509"
|
||||
"encoding/pem"
|
||||
"fmt"
|
||||
"github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/inconshreveable/go-update/download"
|
||||
"github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/kr/binarydist"
|
||||
"io"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"path/filepath"
|
||||
|
||||
"github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/inconshreveable/go-update/download"
|
||||
"github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/kardianos/osext"
|
||||
"github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/kr/binarydist"
|
||||
)
|
||||
|
||||
// The type of a binary patch, if any. Only bsdiff is supported
|
||||
|
14
Godeps/_workspace/src/github.com/kardianos/osext/README.md
generated
vendored
Normal file
14
Godeps/_workspace/src/github.com/kardianos/osext/README.md
generated
vendored
Normal file
@ -0,0 +1,14 @@
|
||||
### Extensions to the "os" package.
|
||||
|
||||
## Find the current Executable and ExecutableFolder.
|
||||
|
||||
There is sometimes utility in finding the current executable file
|
||||
that is running. This can be used for upgrading the current executable
|
||||
or finding resources located relative to the executable file.
|
||||
|
||||
Multi-platform and supports:
|
||||
* Linux
|
||||
* OS X
|
||||
* Windows
|
||||
* Plan 9
|
||||
* BSDs.
|
@ -25,8 +25,3 @@ func ExecutableFolder() (string, error) {
|
||||
folder, _ := filepath.Split(p)
|
||||
return folder, nil
|
||||
}
|
||||
|
||||
// Depricated. Same as Executable().
|
||||
func GetExePath() (exePath string, err error) {
|
||||
return Executable()
|
||||
}
|
@ -2,7 +2,7 @@
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
// +build linux netbsd openbsd solaris
|
||||
// +build linux netbsd openbsd solaris dragonfly
|
||||
|
||||
package osext
|
||||
|
||||
@ -19,7 +19,7 @@ func executable() (string, error) {
|
||||
return os.Readlink("/proc/self/exe")
|
||||
case "netbsd":
|
||||
return os.Readlink("/proc/curproc/exe")
|
||||
case "openbsd":
|
||||
case "openbsd", "dragonfly":
|
||||
return os.Readlink("/proc/curproc/file")
|
||||
case "solaris":
|
||||
return os.Readlink(fmt.Sprintf("/proc/%d/path/a.out", os.Getpid()))
|
Reference in New Issue
Block a user