<commit_before>package travix.commands;

import Sys.*;

class FlashCommand extends Command {

  override function execute() {

    // if we are not on Linux we only compile but do not run the tests
    if(!Travix.isLinux) {
      build(['-swf', 'bin/swf/tests.swf'], function () {});
      return;
    }

    var homePath = "$HOME";
    var flashPath = '$homePath/.macromedia/Flash_Player';

    foldOutput('flash-install', function() {
      // Some xvfb settings
      exec('export', ['AUDIODEV=null']);

      // Create a configuration file so the trace log is enabled
      exec('eval', ['echo "ErrorReportingEnable=1\\nTraceOutputFileEnable=1" > "$homePath/mm.cfg"']);

      // Add the current directory as trusted, so exit can be used.
      exec('eval', ['mkdir -m 777 -p "$flashPath/#Security/FlashPlayerTrust"']);
      exec('eval', ['echo "`pwd`" > "$flashPath/#Security/FlashPlayerTrust/travix.cfg"']);

      exec('eval', ['mkdir -m 777 -p "$flashPath/Logs"']);
      exec('eval', ['rm -f "$flashPath/Logs/flashlog.txt"']);
      exec('eval', ['touch "$flashPath/Logs/flashlog.txt"']);

      // Download and unpack the player, unless it exists already
      if (command("eval", ['test -f "$flashPath/flashplayerdebugger"']) != 0) {
        exec('eval', ['wget -nv -O flash_player_sa_linux.tar.gz https://fpdownload.macromedia.com/pub/flashplayer/updaters/26/flash_player_sa_linux_debug.x86_64.tar.gz']);<commit_msg>Using FlashPlayer 27 instead of 27<commit_after>package travix.commands;

import Sys.*;

class FlashCommand extends Command {

  var flashPlayerVersion = 27;
  
  override function execute() {

    // if we are not on Linux we only compile but do not run the tests
    if(!Travix.isLinux) {
      build(['-swf', 'bin/swf/tests.swf'], function () {});
      return;
    }

    var homePath = "$HOME";
    var flashPath = '$homePath/.macromedia/Flash_Player';

    foldOutput('flash-install', function() {
      // Some xvfb settings
      exec('export', ['AUDIODEV=null']);

      // Create a configuration file so the trace log is enabled
      exec('eval', ['echo "ErrorReportingEnable=1\\nTraceOutputFileEnable=1" > "$homePath/mm.cfg"']);

      // Add the current directory as trusted, so exit can be used.
      exec('eval', ['mkdir -m 777 -p "$flashPath/#Security/FlashPlayerTrust"']);
      exec('eval', ['echo "`pwd`" > "$flashPath/#Security/FlashPlayerTrust/travix.cfg"']);

      exec('eval', ['mkdir -m 777 -p "$flashPath/Logs"']);
      exec('eval', ['rm -f "$flashPath/Logs/flashlog.txt"']);
      exec('eval', ['touch "$flashPath/Logs/flashlog.txt"']);

      // Download and unpack the player, unless it exists already
      if (command("eval", ['test -f "$flashPath/flashplayerdebugger"']) != 0) {
        exec('eval', ['wget -nv -O flash_player_sa_linux.tar.gz https://fpdownload.macromedia.com/pub/flashplayer/updaters/$flashPlayerVersion/flash_player_sa_linux_debug.x86_64.tar.gz']);
{'fraction_non_alphanumeric': 0.16552901023890784, 'fraction_numerical': 0.011604095563139932, 'mean_word_length': 3.4748091603053437, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1063393', 'n_tokens_mistral': 965, 'n_tokens_neox': 901, 'n_words': 233}