'use strict';

const installUtils = require('../../scripts/csdr/install/install-utils');
const tools = require('../../scripts/utils/tools');

const { pkg, remote } = tools.getArgs();

Promise.resolve()
  .then(() => {

    if (pkg) {
      return installUtils.localDev.installPackage(pkg);
    } else {
      if (remote) {
        return installUtils.localDev.installRemote(remote);
      } else {
        return installUtils.localDev.install();
      }
    }

  })
  .catch((e) => {
    console.log(e);
    process.exit(1);
  })
