1
0
mirror of https://github.com/ipfs/kubo.git synced 2025-07-02 03:28:25 +08:00

updated inconshreveable/go-update to get new import location of kardianos/osext

This commit is contained in:
Henry
2015-02-24 00:27:05 +01:00
parent 88dea5771d
commit 59402803be
11 changed files with 26 additions and 17 deletions

11
Godeps/Godeps.json generated
View File

@ -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"

View File

@ -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

View File

@ -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

View 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.

View File

@ -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()
}

View File

@ -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()))