<commit_before>#!/bin/bash

function install_as_root {
                           echo ''
                           echo 'Installing as root...'
                           echo ''
                           sudo cp -a ../DockerOps /usr/share/ && sudo ln -s /usr/share/DockerOps/dockerops /usr/local/bin/dockerops
                           echo 'Building base containers on top of Ubuntu 14.04... (in the next versions you will be able to choose the OS)'
                           fab init
                           echo 'Done.'
                         }


function install_as_user {
                           echo ''
                           echo "Installing for user \"$USER\"..."
                           mkdir -p $HOME/bin/
                           rm -f $HOME/bin/dockerops
                           rm -rf $HOME/.DockerOps
                           ln -s $HOME/.DockerOps/dockerops $HOME/bin/dockerops
                           cp -a ../DockerOps $HOME/.DockerOps
                           echo ''
                           echo 'Building base containers on top of Ubuntu 14.04... (in the next versions you will be able to choose the OS)'
                           fab init
                           echo 'Done. On most of the Linux distributions you have to open a new shell to have $HOME/bin loaded'
                         }


if [ "$1" == "user" ]; then
    install_as_user
    exit 0
fi


if [ "$1" == "root" ]; then
    install_as_root
    exit 0
fi<commit_msg>Added Docker and Fabric checks<commit_after>#!/bin/bash

function install_as_root {
                           echo ''
                           echo 'Installing as root...'
                           echo ''
                           sudo cp -a ../DockerOps /usr/share/ && sudo ln -s /usr/share/DockerOps/dockerops /usr/local/bin/dockerops
                           echo 'Building base containers on top of Ubuntu 14.04... (in the next versions you will be able to choose the OS)'
                           sudo fab init
                           echo 'Done.'
                         }


function install_as_user {
                           echo ''
                           echo "Installing for user \"$USER\"..."
                           mkdir -p $HOME/bin/
                           rm -f $HOME/bin/dockerops
                           rm -rf $HOME/.DockerOps
                           ln -s $HOME/.DockerOps/dockerops $HOME/bin/dockerops
                           cp -a ../DockerOps $HOME/.DockerOps
                           echo ''
                           echo 'Building base containers on top of Ubuntu 14.04... (in the next versions you will be able to choose the OS)'
                           fab init
                           echo 'Done. On most of the Linux distributions you have to open a new shell to have $HOME/bin loaded'
                         }

echo ""

# Check that docker is installed
if hash docker 2>/dev/null; then
    echo "[OK] Found Docker"
else
    echo "[ERROR] Missing Docker" 
    exit 1
fi

# Check that fab is installed
if hash fab 2>/dev/null; then
    echo "[OK] Found fabric package (fab command)"
else
    echo "[ERROR] Missing fabric package (fab command)"
    exit 1
fi


if [ "$1" == "user" ]; then
    install_as_user
    exit 0
fi


if [ "$1" == "root" ]; then
    install_as_root
    exit 0
fi
{'fraction_non_alphanumeric': 0.08293556085918855, 'fraction_numerical': 0.008353221957040573, 'mean_word_length': 1.0826086956521739, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4277069', 'n_tokens_mistral': 898, 'n_tokens_neox': 814, 'n_words': 311}