treat windows less differently
This commit is contained in:
parent
1c38262641
commit
dafc02201f
15
build-all.go
15
build-all.go
|
@ -165,7 +165,22 @@ func main() {
|
||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
strip := 1
|
strip := 1
|
||||||
|
if "windows" == pkg.os {
|
||||||
|
// re-nest into "bin" for consistency
|
||||||
|
err = unzip(z, s.Size(), filepath.Join(outdir, "bin"), strip)
|
||||||
|
// handle the special case of git bash
|
||||||
|
sh := strings.Join([]string{
|
||||||
|
`#!/usr/bin/env bash`,
|
||||||
|
`"$(dirname "$0")/node.exe" "$@"`,
|
||||||
|
`exit $?`,
|
||||||
|
}, "\n")
|
||||||
|
script := filepath.Join(outdir, "bin", "node")
|
||||||
|
if err := ioutil.WriteFile(script, []byte(sh), 0755); nil != err {
|
||||||
|
panic(err)
|
||||||
|
}
|
||||||
|
} else {
|
||||||
err = unzip(z, s.Size(), outdir, strip)
|
err = unzip(z, s.Size(), outdir, strip)
|
||||||
|
}
|
||||||
if nil != err {
|
if nil != err {
|
||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue