index.js
function setupTempDir(tmpDir) {
  var rpmStructure = ['BUILD', 'BUILDROOT', 'RPMS', 'SOURCES', 'SPECS', 'SRPMS'];

  // If the tmpDir exists (probably from previous build), delete it first
  if (fsx.existsSync(tmpDir)) {
    logger(chalk.cyan('Removing old temporary directory.'));
    fsx.removeSync(tmpDir);
  }

  // Create RPM folder structure
  logger(chalk.cyan('Creating RPM directory structure at:'), tmpDir);
  _.forEach(rpmStructure, function(dirName) {
    fsx.mkdirpSync(path.join(tmpDir, dirName));
  });
}
function setupTempDir(tmpDir) {
  var rpmStructure = ['BUILD', 'BUILDROOT', 'RPMS', 'SOURCES', 'SPECS', 'SRPMS'];

  // If the tmpDir exists (probably from previous build), delete it first
  if (fsx.existsSync(tmpDir)) {
    logger(chalk.cyan('Removing old temporary directory.'));
    fsx.removeSync(tmpDir);
  }

  // Create RPM folder structure
  logger(chalk.cyan('Creating RPM directory structure at:'), tmpDir);
  _.forEach(rpmStructure, function(dirName) {
    fsx.mkdirpSync(path.join(tmpDir, dirName));
  });
}
function setupTempDir ( tmpDir ) { var rpmStructure = [ 'BUILD' , 'BUILDROOT' , 'RPMS' , 'SOURCES' , 'SPECS' , 'SRPMS' ] ; // If the tmpDir exists (probably from previous build), delete it first if ( fsx . existsSync ( tmpDir ) ) { logger ( chalk . cyan ( 'Removing old temporary directory.' ) ) ; fsx . removeSync ( tmpDir ) ; } // Create RPM folder structure logger ( chalk . cyan ( 'Creating RPM directory structure at:' ) , tmpDir ) ; _ . forEach ( rpmStructure , function ( dirName ) { fsx . mkdirpSync ( path . join ( tmpDir , dirName ) ) ; } ) ; }
Creates the folder structure needed to create
the RPM package.

@param  {String} tmpDir the path where the folder structure will reside
Creates the folder structure needed to create the RPM package .