code: function downloadFile(url) {
    requestProgress(request({
      url: url,
      header: {
        'User-Agent': userAgent
      }
    }))
      .on('progress', function (state) {
        if (!bar) {
          console.log('downloading %s', url)
          bar = new ProgressBar(':bar :percent(:current byte)', {
            total: state.size.total,
            width: 12 + url.length
          })
        }
        bar.curr = state.size.transferred
        bar.tick()
      })
      .on('end', function () {
        bar.curr = bar.total
        bar.tick()
        // 为了显示 100% 和换行 所以下面代码运行在 nextTick
        process.nextTick(function () {
          console.log('download completed: ' + tmpZipFilePath)
          var fileMd5 = md5File.sync(tmpZipFilePath)
          if (expectedMd5 !== fileMd5) {
            console.error('md5 does not match, expect ' + expectedMd5 + ' but got ' + fileMd5)
            onInterrupted()
          }
          console.log('md5 check ok')
          console.log('unzip to ' + tmpZipFilePath)
          unZipFile(tmpZipFilePath)
        })
      })
      .pipe(fs.createWriteStream(tmpZipFilePath))
  }
docs: 下载
  
  - 从网上下载 qshell 的指定版本的压缩包
  
  @param url