const path = require('path');
const { promisify } = require('util');
const fs = require('fs');
const rmdir = promisify(fs.rmdir);
  
(async () => {
  if (process.platform === "darwin") {
    await Promise.all([
      rmdirRecursive('../libs/win32')
    ]);
  }
  else if (process.platform === "win32") {
    await Promise.all([
      rmdirRecursive('../libs/darwin')
    ]);
  }
  else {
    throw new Error("platform wrong! not darwin or win32!");
  }
})();

async function rmdirRecursive(dirPath) {
  return rmdir(path.join(__dirname, dirPath), { recursive: true });
}
