<commit_before>// Copyright (c) 2013 <NAME> <<EMAIL>>

// install.js
'use strict';

var fs =require('fs')
  , path = require('path')
  , yeoman
  , foundation
  , yeomanGeneratorPath;

  // Relative path to yeoman generators
  yeomanGeneratorPath = 'yeoman/node_modules/yeoman-generators/lib/generators';

  foundation = path.resolve(__dirname, 'foundation');

  /**
   * Deciding to install locally or globally?
   *
   * If we are installing the generator globally, this script will be
   * running from within the global `node_modules` directory. We
   * can then check if yeoman is installed by checking if the path to
   * its generators exists. If the path exists, create a symlink to this
   * generator.
   */

  yeoman = path.resolve(__dirname, '..', yeomanGeneratorPath);
  // console.log('yeoman path:', yeoman);
  // console.log('foundation path', foundation);

// TODO detect if generator is already installed.
// if installed, fs.unlink


  fs.exists(yeoman, function (exists) {
    console.log(exists ? "it's there" : "no yeoman or local install");
    if (exists) {
      // create symlink
      fs.link(foundation, path.resolve(yeoman, 'foundation'), function(err) {
        if (err) console.log('error', err);
        console.log('successfully installed yeoman-foundation in', foundation);
        console.log('and created a link in ', yeoman);
      });
    }
  });<commit_msg>create symlink instead of hard link<commit_after>// Copyright (c) 2013 <NAME> <<EMAIL>>

// install.js
'use strict';

var fs =require('fs')
  , path = require('path')
  , yeoman
  , foundation
  , yeomanGeneratorPath;

  // Relative path to yeoman generators
  yeomanGeneratorPath = 'yeoman/node_modules/yeoman-generators/lib/generators';

  foundation = path.resolve(__dirname, 'foundation');

  /**
   * Deciding to install locally or globally?
   *
   * If we are installing the generator globally, this script will be
   * running from within the global `node_modules` directory. We
   * can then check if yeoman is installed by checking if the path to
   * its generators exists. If the path exists, create a symlink to this
   * generator.
   */

  yeoman = path.resolve(__dirname, '..', yeomanGeneratorPath);
  // console.log('yeoman path:', yeoman);
  // console.log('foundation path', foundation);

// TODO detect if generator is already installed.
// if installed, fs.unlink


  fs.exists(yeoman, function (exists) {
    console.log(exists ? "it's there" : "no yeoman or local install");
    if (exists) {
      // create symlink
      fs.symlink(foundation, path.resolve(yeoman, 'foundation'), 'dir', function(err) {
        if (err) console.log('error', err);
        console.log('successfully installed yeoman-foundation in', foundation);
        console.log('and created a link in ', yeoman);
      });
    }
  });
{'fraction_non_alphanumeric': 0.12570821529745044, 'fraction_numerical': 0.0028328611898017, 'mean_word_length': 3.366306027820711, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '555374', 'n_tokens_mistral': 853, 'n_tokens_neox': 825, 'n_words': 268}