# 主脚本参数
param (
    [string]$Action, 
    [string]$Version
)
. .\comm.ps1 


function Install {
    param (
        [string]$Version
    )
    Lang-Print -Msg "正在下载 WSL:{}" -Arguments @($Version)
    $DownUrl = "$DownNode/win/wsl/" + $Version +"_x64.zip"
    $wsl_package_path = "$SOFT_PATH/temp/$Version.zip"

    if (-not (Download-File -Url $DownUrl -OutputPath $wsl_package_path)) {
        Lang-Print -Msg "下载 {} 安装包失败" -Arguments @("WSL")
        return
    }
    # 安装 WSL
    Lang-Print -Msg "正在安装 WSL:{}" -Arguments @($Version)
 
   
}

function UnInstall {

}


switch ($Action.ToLower()) {
    "install" {       
        Install -Version $Version
    }
    "uninstall" {
        UnInstall
    }    
}
