<commit_before>#!/bin/sh
#This script is used for setting up the SEEK application and its environment. It is tested on Ubuntu 10.4 and 10.10
#You might want to change the path and directory where SEEK is installed, by changing the values of the variables: SEEK_PATH, SEEK_DIRECTORY
#You might want to specify the repository where SEEK get cloned and its version , by changing the value of variable: REPOSITORY
#More information about each step of installation can be found at SEEK_PATH/SEEK_DIRECTORY/doc/INSTALL

SEEK_PATH="/home/$(whoami)" 
SEEK_DIRECTORY="seek"
REPOSITORY="https://bitbucket.org/seek4science/seek -r v0.17.1"

txtgrn=$(tput setaf 2) # Green
txtrst=$(tput sgr0) # Text reset

set -e

sudo sed -i 's/# deb http:\/\/archive.canonical.com\/ubuntu/deb http:\/\/archive.canonical.com\/ubuntu/g' /etc/apt/sources.list
sudo sed -i 's/# deb-src http:\/\/archive.canonical.com\/ubuntu/deb-src http:\/\/archive.canonical.com\/ubuntu/g' /etc/apt/sources.list

echo "${txtgrn} *********************************** ${txtrst}"
echo "${txtgrn} Installing prequisites ${txtrst}"
sudo apt-get update

sudo apt-get install wget git-core mercurial ruby rdoc ri libopenssl-ruby ruby-dev mysql-server libssl-dev build-essential openssh-server
sudo apt-get install libmysqlclient16-dev libmagick++-dev libxslt-dev libxml++2.6-dev openjdk-6-jdk graphviz libsqlite3-dev sqlite3
sudo apt-get install poppler-utils
sudo apt-get purge openoffice* libreoffice*
sudo apt-get install python-software-properties
sudo add-apt-repository ppa:libreoffice/libreoffice-3-5
sudo apt-get update
sudo apt-get install libreoffice

echo "${txtgrn} *********************************** ${txtrst}"
echo "${txtgrn} Installing rubygems ${txtrst}"
cd /tmp
wget http://production.cf.rubygems.org/rubygems/rubygems-1.6.2.tgz
tar zfxv rubygems-1.6.2.tgz
cd rubygems-1.6.2/
sudo ruby ./setup.rb
cd /usr/bin/

symboliclink="gem"
if [ -L "$symboliclink" ]; then
    sudo rm "$symboliclink"
fi
sudo ln -s gem1.8 gem
cd -

if [ ! -d "$SEEK_PATH" ]; then
    mkdir "$SEEK_PATH"
fi

cd "$SEEK_PATH"
directory="$SEEK_PATH/$SEEK_DIRECTORY" 
if [ -d "$directory" ]; then
    sudo rm -rf "$directory"
fi

echo "${txtgrn} *********************************** ${txtrst}"
echo "${txtgrn} Cloning SEEK from $REPOSITORY ${txtrst}"
sudo hg clone $REPOSITORY $SEEK_DIRECTORY<commit_msg>also update install script for ubuntu 10.04<commit_after>#!/bin/sh
#This script is used for setting up the SEEK application and its environment. It is tested on Ubuntu 10.4 and 10.10
#You might want to change the path and directory where SEEK is installed, by changing the values of the variables: SEEK_PATH, SEEK_DIRECTORY
#You might want to specify the repository where SEEK get cloned and its version , by changing the value of variable: REPOSITORY
#More information about each step of installation can be found at SEEK_PATH/SEEK_DIRECTORY/doc/INSTALL

SEEK_PATH="/home/$(whoami)" 
SEEK_DIRECTORY="seek"
REPOSITORY="https://bitbucket.org/seek4science/seek -r v0.17.1"

txtgrn=$(tput setaf 2) # Green
txtrst=$(tput sgr0) # Text reset

set -e

sudo sed -i 's/# deb http:\/\/archive.canonical.com\/ubuntu/deb http:\/\/archive.canonical.com\/ubuntu/g' /etc/apt/sources.list
sudo sed -i 's/# deb-src http:\/\/archive.canonical.com\/ubuntu/deb-src http:\/\/archive.canonical.com\/ubuntu/g' /etc/apt/sources.list

echo "${txtgrn} *********************************** ${txtrst}"
echo "${txtgrn} Installing prequisites ${txtrst}"
sudo apt-get update

sudo apt-get install wget git-core mercurial ruby rdoc ri libopenssl-ruby ruby-dev mysql-server libssl-dev build-essential openssh-server
sudo apt-get install libmysqlclient16-dev libmagick++-dev libxslt-dev libxml++2.6-dev openjdk-6-jdk graphviz libsqlite3-dev sqlite3
sudo apt-get install poppler-utils openoffice.org openoffice.org-java-common

echo "${txtgrn} *********************************** ${txtrst}"
echo "${txtgrn} Installing rubygems ${txtrst}"
cd /tmp
wget http://production.cf.rubygems.org/rubygems/rubygems-1.6.2.tgz
tar zfxv rubygems-1.6.2.tgz
cd rubygems-1.6.2/
sudo ruby ./setup.rb
cd /usr/bin/

symboliclink="gem"
if [ -L "$symboliclink" ]; then
    sudo rm "$symboliclink"
fi
sudo ln -s gem1.8 gem
cd -

if [ ! -d "$SEEK_PATH" ]; then
    mkdir "$SEEK_PATH"
fi

cd "$SEEK_PATH"
directory="$SEEK_PATH/$SEEK_DIRECTORY" 
if [ -d "$directory" ]; then
    sudo rm -rf "$directory"
fi

echo "${txtgrn} *********************************** ${txtrst}"
echo "${txtgrn} Cloning SEEK from $REPOSITORY ${txtrst}"
sudo hg clone $REPOSITORY $SEEK_DIRECTORY
{'fraction_non_alphanumeric': 0.1671438009249064, 'fraction_numerical': 0.015415106804668574, 'mean_word_length': 4.635235732009925, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, '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': '7639873', 'n_tokens_mistral': 1672, 'n_tokens_neox': 1524, 'n_words': 466}