const _ = require('lodash');
const exec = require('shell-utils').exec;

const version = process.argv.splice(process.execArgv.length + 2)[0];
const scriptDir = __dirname;
const distDir = `${scriptDir}/../../dist`;

run();

function run() {
  const url = exec.execSyncRead(`npm view jsc-android@${version} dist.tarball`);
  exec.execSync(`curl ${url} | tar -xf -`);
  exec.execSync(`rm -rf ${distDir}`);
  exec.execSync(`cd package && mv $(find . -type d -maxdepth 1 -mindepth 1) ${distDir}`);
  exec.execSync(`rm -rf ./package`);
}

@@ -232,16 +232,108 @@
 run() %7B%0A
+  if (!version) %7B%0A    throw new Error(%60usage: npm run downloadPublishedVersion 224109%60)%0A  %7D%0A
   const 

update script