<commit_before>#!/bin/bash
#
# Script to install libbitcoin, libwallet, obelisk and sx tools.
#
# Install dependencies and compiles the source code from git for Debian 7 / Ubuntu 13.10 or Fedora GNU/Linux distributions.
#
# Requires sudo. 
#
# To execute this script, run:
# <sudo bash install-sx.sh>
#
# To read help instructions run:
# <sudo bash install-sx.sh --help>
#
#
set -e
echo
echo " [+] Welcome to S(pesmilo)X(changer)."
echo
if [ "$#" = "1" ]; then
    if [[ "$1" = /* ]]; then
        #Absolute path
        INSTALL_PREFIX=$1
    elif [ "$1" = "--help" ]; then
        echo " [+] Install script help:"
        echo " --> To execute this script type:"
        echo " <sudo bash install-sx.sh>"
        echo " --> To execute this script and install at a specific path type:"
        echo " <bash install-sx.sh PATH/...>"
        echo " This script will install libbitcoin, libwallet, obelisk and sx tools."
        echo " The standard path for the installation is /usr/local/"
        echo " The stardard path for the conf files is /etc."
        echo
        exit
    else
        #Relative path
        RELATIVE=`pwd`
        INSTALL_PREFIX=$RELATIVE/$1
    fi
    CONF_DIR=$INSTALL_PREFIX/etc
    RUN_LDCONFIG=
    ROOT_INSTALL=0
elif [ `id -u` = "0" ]; then
    INSTALL_PREFIX=/usr/local
    CONF_DIR=/etc
    RUN_LDCONFIG=ldconfig
    ROOT_INSTALL=1
else
    echo
    echo "[+] ERROR: This script must be run as root." 1>&2
    echo
    echo "<sudo bash install-sx.sh>"
    echo
    exit
fi
SRC_DIR=$INSTALL_PREFIX/src
PKG_CONFIG_PATH=$INSTALL_PREFIX/lib/pkgconfig
mkdir -p $SRC_DIR
mkdir -p $PKG_CONFIG_PATH
#Set the obelsik version to install
#From March 13 2014
LIBW_VER=21447cc
#From March 13 2014
LIBB_VER=335489f
#From March 6 2014
OBE_VER=58f326d
#From March 12 2014
SX_VER=a97f7be
#
install_dependencies(){
    flavour_id=`cat /etc/*-release | egrep -i "^ID=" | cut -f 2 -d "="`
    echo " Flavour: $flavour_id."
    echo
    if [ "$flavour_id" = "debian" ]; then
        if [ "$ROOT_INSTALL" = 1 ]; then
# Debian dependencies
            D_DEPENDENCIES="git build-essential autoconf apt-utils libtool libboost-all-dev pkg-config libcurl4-openssl-dev libleveldb-dev libzmq-dev libconfig++-dev libncurses5-dev"
            sleep 0.5
            apt-get -y install $D_DEPENDENCIES
        fi
    elif [ "$flavour_id" = "ubuntu" ]; then
        if [ "$ROOT_INSTALL" = 1 ]; then
# Ubuntu dependencies (some people have libboost1.53-dev installed, determine which is installed rather than error out.  Defaults onto 1.49)
            for BOOST_VER in 1.49 1.53 ; do
                dpkg -s "libboost$BOOST_VER-dev" >/dev/null 2>&1 && U_BOOST=$BOOST_VER
            done<commit_msg>set versions to same used as omniwallet<commit_after>#!/bin/bash
#
# Script to install libbitcoin, libwallet, obelisk and sx tools.
#
# Install dependencies and compiles the source code from git for Debian 7 / Ubuntu 13.10 or Fedora GNU/Linux distributions.
#
# Requires sudo. 
#
# To execute this script, run:
# <sudo bash install-sx.sh>
#
# To read help instructions run:
# <sudo bash install-sx.sh --help>
#
#
set -e
echo
echo " [+] Welcome to S(pesmilo)X(changer)."
echo
if [ "$#" = "1" ]; then
    if [[ "$1" = /* ]]; then
        #Absolute path
        INSTALL_PREFIX=$1
    elif [ "$1" = "--help" ]; then
        echo " [+] Install script help:"
        echo " --> To execute this script type:"
        echo " <sudo bash install-sx.sh>"
        echo " --> To execute this script and install at a specific path type:"
        echo " <bash install-sx.sh PATH/...>"
        echo " This script will install libbitcoin, libwallet, obelisk and sx tools."
        echo " The standard path for the installation is /usr/local/"
        echo " The stardard path for the conf files is /etc."
        echo
        exit
    else
        #Relative path
        RELATIVE=`pwd`
        INSTALL_PREFIX=$RELATIVE/$1
    fi
    CONF_DIR=$INSTALL_PREFIX/etc
    RUN_LDCONFIG=
    ROOT_INSTALL=0
elif [ `id -u` = "0" ]; then
    INSTALL_PREFIX=/usr/local
    CONF_DIR=/etc
    RUN_LDCONFIG=ldconfig
    ROOT_INSTALL=1
else
    echo
    echo "[+] ERROR: This script must be run as root." 1>&2
    echo
    echo "<sudo bash install-sx.sh>"
    echo
    exit
fi
SRC_DIR=$INSTALL_PREFIX/src
PKG_CONFIG_PATH=$INSTALL_PREFIX/lib/pkgconfig
mkdir -p $SRC_DIR
mkdir -p $PKG_CONFIG_PATH
#Set the obelsik version to install
#From March 13 2014LIBW_VER=21447cc
LIBW_VER=cd9b8bb
#From March 13 2014 LIBB_VER=335489f
LIBB_VER=ebadde8
#From March 6 2014 OBE_VER=58f326d
OBE_VER=4962e2c
#From March 12 2014 SX_VER=a97f7be
SX_VER=d9b566e
#
install_dependencies(){
    flavour_id=`cat /etc/*-release | egrep -i "^ID=" | cut -f 2 -d "="`
    echo " Flavour: $flavour_id."
    echo
    if [ "$flavour_id" = "debian" ]; then
        if [ "$ROOT_INSTALL" = 1 ]; then
# Debian dependencies
            D_DEPENDENCIES="git build-essential autoconf apt-utils libtool libboost-all-dev pkg-config libcurl4-openssl-dev libleveldb-dev libzmq-dev libconfig++-dev libncurses5-dev"
            sleep 0.5
            apt-get -y install $D_DEPENDENCIES
        fi
    elif [ "$flavour_id" = "ubuntu" ]; then
        if [ "$ROOT_INSTALL" = 1 ]; then
# Ubuntu dependencies (some people have libboost1.53-dev installed, determine which is installed rather than error out.  Defaults onto 1.49)
            for BOOST_VER in 1.49 1.53 ; do
                dpkg -s "libboost$BOOST_VER-dev" >/dev/null 2>&1 && U_BOOST=$BOOST_VER
            done
{'fraction_non_alphanumeric': 0.11224489795918367, 'fraction_numerical': 0.030612244897959183, 'mean_word_length': 2.6888440860215055, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 23, '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': '2308667', 'n_tokens_mistral': 2063, 'n_tokens_neox': 1815, 'n_words': 576}