<commit_before>#!/bin/bash
#
# Description : PiSNES for Raspberry Pi by Squid
# Author      : <NAME> (<EMAIL>)
# Version     : 0.9 (15/May/14)
#
clear

INSTALL_DIR="/home/$USER/games/pisnes/"
URL_FILE="http://pisnes.googlecode.com/git/pisnes.zip"

validate_url(){
    if [[ `wget -S --spider $1 2>&1 | grep 'HTTP/1.1 200 OK'` ]]; then echo "true"; fi
}

changeInstallDir(){
    echo "Enter new full path:"
    read INSTALL_DIR
    echo "New path: $INSTALL_DIR"
}

install(){
    if [[ $(validate_url $URL_FILE) != "true" ]] ; then
        echo "Sorry, the emulator is not available here: $URL_FILE. Visit the website to download it manually."
        exit
    else 
        mkdir -p $INSTALL_DIR && cd $_
        wget -qO- -O tmp.zip $URL_FILE && unzip -o tmp.zip && rm tmp.zip
        chmod 777 ./snes9x ./snes9x.cfg ./roms ./skins
        echo "Done!. To play go to install path, copy any rom to /roms directory and type: ./snes9x <rom name>"
    fi
    read -p "Press [Enter] to continue..."
    exit
}

echo -e "Install PiSNES (Version 1.39)\n=============================\nMore Info: http://pisnes.googlecode.com\n\nInstall path: $INSTALL_DIR"
while true; do
    echo " "
    read -p "Is it right? [y/n] " yn
    case $yn in
    [Yy]* ) echo "Installing, please wait..." && install;;
    [Nn]* ) changeInstallDir;;
    [Ee]* ) exit;;
    * ) echo "Please answer (y)es, (n)o or (e)xit.";;
    esac
done<commit_msg>Updated with a new pisnes & added the homebrew game Uwol<commit_after>#!/bin/bash
#
# Description : PiSNES for Raspberry Pi by Squid
# Author      : <NAME> (<EMAIL>)
# Version     : 0.9.1 (17/Mar/15)
# Compatible  : Raspberry Pi 1 & 2 (tested)
#
clear

. ../helper.sh || . ./scripts/helper.sh || . ./helper.sh || wget -q 'http://github.com/jmcerrejon/PiKISS/raw/master/scripts/helper.sh'
check_board || { echo "Missing file helper.sh. I've tried to download it for you. Try to run the script again." && exit 1; }

INSTALL_DIR="$HOME/games/pisnes/"
URL_FILE="http://sourceforge.net/projects/pisnes/files/latest/download?source=files"
GAME_URL="http://www.dropbox.com/s/b6tl84p3a17w5ab/UwolQuestForMoney.sfc?dl=0"

changeInstallDir(){
    echo "Enter new full path:"
    read INSTALL_DIR
    echo "New path: $INSTALL_DIR"
}

install(){
    mkdir -p $INSTALL_DIR && cd $_
    wget -qO- -O tmp.zip $URL_FILE && unzip -o tmp.zip && rm tmp.zip
    chmod 777 ./snes9x ./snes9x.cfg ./roms ./skins
    echo -e "\nInstalling game Uwol Quest For Money (uwol.sfc) on $INSTALL_DIR\n\n" && wget -q -O $INSTALL_DIR/uwol.sfc  $GAME_URL
    echo "Done!. To play go to install path, copy any rom to /roms directory and type: ./snes9x <rom name>"
    read -p "Press [Enter] to continue..."
    exit
}

echo -e "Install PiSNES (Version 1.39)\n=============================\nMore Info: http://sourceforge.net/projects/pisnes\n\nInstall path: $INSTALL_DIR"
while true; do
    echo " "
    read -p "Is it right? [y/n] " yn
    case $yn in
    [Yy]* ) echo "Installing, please wait..." && install;;
    [Nn]* ) changeInstallDir;;
    [Ee]* ) exit;;
    * ) echo "Please answer (y)es, (n)o or (e)xit.";;
    esac
done
{'fraction_non_alphanumeric': 0.1742765273311897, 'fraction_numerical': 0.01607717041800643, 'mean_word_length': 2.928030303030303, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 10, 'https://': 0, 'lorem ipsum': 0, 'www.': 1, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 3, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4702162', 'n_tokens_mistral': 1191, 'n_tokens_neox': 1132, 'n_words': 334}