Browse Source

add support for xp & ntfs; gopm build self bug fixed

pull/103/head
Lunny Xiao 11 years ago
parent
commit
ee4aab616a
  1. 7
      cmd/gopath.go
  2. 11
      cmd/helper_windows.go
  3. 2
      gopm.go

7
cmd/gopath.go

@ -219,8 +219,11 @@ func genNewGoPath(ctx *cli.Context, isTest bool) {
oldPath := filepath.Join(installRepoPath, name) + suf oldPath := filepath.Join(installRepoPath, name) + suf
newPath := filepath.Join(newGoPathSrc, name) newPath := filepath.Join(newGoPathSrc, name)
paths := strings.Split(name, "/") paths := strings.Split(name, "/")
var isExistP bool var isExistP, isCurChild bool
var isCurChild bool if name == pkgName {
continue
}
for i := 0; i < len(paths)-1; i++ { for i := 0; i < len(paths)-1; i++ {
pName := strings.Join(paths[:len(paths)-1-i], "/") pName := strings.Join(paths[:len(paths)-1-i], "/")
if _, ok := cachePkgs[pName]; ok { if _, ok := cachePkgs[pName]; ok {

11
cmd/helper_windows.go

@ -19,6 +19,17 @@ func makeLink(srcPath, destPath string) error {
// XP. // XP.
isWindowsXP = true isWindowsXP = true
// if both are ntfs file system
if volumnType(srcPath) == "NTFS" && volumnType(destPath) == "NTFS" {
// if has junction command installed
file, err := exec.LookPath("junction")
if err == nil {
path, _ := filepath.Abs(file)
cmd := exec.Command("cmd", "/c", "junction", destPath, srcPath)
return cmd.Run()
}
}
os.RemoveAll(destPath) os.RemoveAll(destPath)
err := com.CopyDir(srcPath, destPath) err := com.CopyDir(srcPath, destPath)

2
gopm.go

@ -29,7 +29,7 @@ import (
// Test that go1.1 tag above is included in builds. main.go refers to this definition. // Test that go1.1 tag above is included in builds. main.go refers to this definition.
const go11tag = true const go11tag = true
const APP_VER = "0.6.0.1206.2" const APP_VER = "0.6.0.1207"
// //cmd.CmdSearch, // //cmd.CmdSearch,
// cmdClean, // cmdClean,

Loading…
Cancel
Save