<commit_before>#!/bin/bash
done_message () {
    if [ $? == 0 ]; then
        echo " done."
        if [ "x$1" != "x" ]; then
            echo $1;
        fi
    else
        echo " failed.  See setup.log file for error messages." $2
    fi
}

echo > setup.log;
echo -n "Installing Perl prerequisites ..."
if [ -f bin/cpanm ]; then 
	echo  "Prerequisites installed, finished.";
	exit 0; 
fi

if ! ( perl -MExtUtils::MakeMaker -e 1 >/dev/null 2>&1); then
    echo;
    echo "WARNING: Your Perl installation does not seem to include a complete set of core modules.  Attempting to cope with this, but if installation fails please make sure that at least ExtUtils::MakeMaker is installed.  For most users, the best way to do this is to use your system's package manager: apt, yum, fink, homebrew, or similar.";
fi;
( set -x;
  cd src/main/webapp/jbrowse;
  chmod +x bin/cpanm
  bin/cpanm -v --notest -l ../../../../extlib DBI DBD::Pg Crypt::PBKDF2 LWP::UserAgent JSON < /dev/null;
  bin/cpanm -v --notest -l ../../../../extlib DBI DBD::Pg Crypt::PBKDF2 LWP::UserAgent JSON < /dev/null;
  bin/cpanm -v --notest -l ../../../../extlib/ --installdeps .< /dev/null;
  bin/cpanm -v --notest -l ../../../../extlib/ --installdeps .< /dev/null;
  set -e;
  bin/cpanm -v --notest -l ../../../../extlib DBI DBD::Pg Crypt::PBKDF2 LWP::UserAgent JSON < /dev/null;
  bin/cpanm -v --notest -l ../../../../extlib/ --installdeps .< /dev/null;
  cd -;
  cp -r src/main/webapp/jbrowse/bin/ bin;
  cp -r src/main/webapp/jbrowse/src/perl5 src/perl5;
) >>setup.log 2>&1;
done_message "" "As a first troubleshooting step, make sure development libraries and header files for GD, Zlib, and libpng are installed and try again.";<commit_msg>Add chmod to install_jbrowse. See #97<commit_after>#!/bin/bash
done_message () {
    if [ $? == 0 ]; then
        echo " done."
        if [ "x$1" != "x" ]; then
            echo $1;
        fi
    else
        echo " failed.  See setup.log file for error messages." $2
    fi
}

echo > setup.log;
echo -n "Installing Perl prerequisites ..."
if [ -f bin/cpanm ]; then 
	echo  "Prerequisites installed, finished.";
	exit 0; 
fi

if ! ( perl -MExtUtils::MakeMaker -e 1 >/dev/null 2>&1); then
    echo;
    echo "WARNING: Your Perl installation does not seem to include a complete set of core modules.  Attempting to cope with this, but if installation fails please make sure that at least ExtUtils::MakeMaker is installed.  For most users, the best way to do this is to use your system's package manager: apt, yum, fink, homebrew, or similar.";
fi;
( set -x;
  cd src/main/webapp/jbrowse;
  chmod +x bin/cpanm
  bin/cpanm -v --notest -l ../../../../extlib DBI DBD::Pg Crypt::PBKDF2 LWP::UserAgent JSON < /dev/null;
  bin/cpanm -v --notest -l ../../../../extlib DBI DBD::Pg Crypt::PBKDF2 LWP::UserAgent JSON < /dev/null;
  bin/cpanm -v --notest -l ../../../../extlib/ --installdeps .< /dev/null;
  bin/cpanm -v --notest -l ../../../../extlib/ --installdeps .< /dev/null;
  set -e;
  bin/cpanm -v --notest -l ../../../../extlib DBI DBD::Pg Crypt::PBKDF2 LWP::UserAgent JSON < /dev/null;
  bin/cpanm -v --notest -l ../../../../extlib/ --installdeps .< /dev/null;
  cd -;
  cp -r src/main/webapp/jbrowse/bin/ bin;
  chmod +x bin/*.pl;
  cp -r src/main/webapp/jbrowse/src/perl5 src/perl5;
) >>setup.log 2>&1;
done_message "" "As a first troubleshooting step, make sure development libraries and header files for GD, Zlib, and libpng are installed and try again.";
{'fraction_non_alphanumeric': 0.16988751081626766, 'fraction_numerical': 0.009229881742140178, 'mean_word_length': 2.4201183431952664, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, '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': '2803111', 'n_tokens_mistral': 1304, 'n_tokens_neox': 1239, 'n_words': 419}