windows自定义安装目录
gaozejie opened this issue · 3 comments
shell脚本中有base_dir参数,在iwr https://raw.githubusercontent.com/voidint/g/master/install.ps1 -useb | iex命令如何传递参数
`param (
[string] $release = "1.6.0",
[string] $base_dir
)
$os = "windows"
$arch = "amd64"
$base_dir = $base_dir -eq "" ? ($env:G_HOME ? $env:G_HOME : "$HOME.g") : $base_dir
再描述清楚一些
shell脚本中有base_dir参数,在iwr https://raw.githubusercontent.com/voidint/g/master/install.ps1 -useb | iex命令如何传递参数 `param ( [string] $release = "1.6.0", [string] $base_dir )
$os = "windows" $arch = "amd64"
$base_dir = $base_dir -eq "" ? ($env:G_HOME ? $env:G_HOME : "$HOME.g") :
$base_dir destfile="{base_dir}\downloads\g$ {release}.${os}-${arch}.zip"`
设置 G_HOME 环境变量自定义安装目录, 例如:
$env:G_HOME="D:\.g"; iwr https://raw.githubusercontent.com/voidint/g/master/install.ps1 -useb | iex
shell脚本中有base_dir参数,在iwr https://raw.githubusercontent.com/voidint/g/master/install.ps1 -useb | iex命令如何传递参数
param ( [string] $release = "1.6.0", [string] $base_dir ) $os = "windows" $arch = "amd64" $base_dir = $base_dir -eq "" ? ($env:G_HOME ? $env:G_HOME : "$HOME.g") : basedirdestfile="basedir\downloads\g{release}.${os}-${arch}.zip"
设置 G_HOME 环境变量自定义安装目录, 例如:
$env:G_HOME="D:\.g"; iwr https://raw.githubusercontent.com/voidint/g/master/install.ps1 -useb | iex
好的