<commit_before>#!/bin/bash

# Set the glint-nes branch to pull from on github if it isn't already set
if [ -z "$GLINTNESBRANCH" ]
then
  export GLINTNESBRANCH=master
fi

RETROARCH_CONFIG="$HOME/.retroarch"

function addCertificatesForRetroarchBinaries() {
  echo ""
  echo "## Adding certificates and apt sources for retroarch..."
  echo ""
  
  sudo apt-get -y install ca-certificates libxv1
  echo "deb http://archive.changeover.za.net/raspbian wheezy main" > changeover.list
  sudo mv changeover.list /etc/apt/sources.list.d/
  sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-key <KEY>
}

function aptGetUpdateAndUpgrade() {
  echo ""
  echo "## Updating apt..."
  echo ""
  
  # DON'T call this function BEFORE the addition of the apt-key for retroarch binary, otherwise it will break
  sudo apt-get -y update
  sudo apt-get -y upgrade
}

function installFceuAndRetroarch() {
  echo ""
  echo "## Installing retroarch and fceu..."
  echo ""
  
  sudo apt-get -y install libretro-fceu retroarch
  
  mkdir -p $RETROARCH_CONFIG
  curl -L https://raw.github.com/normalocity/glint-nes/$GLINTNESBRANCH/config/retroarch.cfg > $RETROARCH_CONFIG/retroarch.cfg  
}

function copyUserAndRPiConfigFiles() {
  echo ""
  echo "## Copying user and RPi config files..."
  echo ""
  
  curl -L https://raw.github.com/normalocity/glint-nes/$GLINTNESBRANCH/config/.profile > ~/.profile
  curl -L https://raw.github.com/normalocity/glint-nes/$GLINTNESBRANCH/config/raspberry-pi-config.txt > /tmp/config.txt
  sudo mv /boot/config.txt /boot/config.txt.backup
  sudo mv /tmp/config.txt /boot/config.txt
}

function makeGlintLogFolder() {
  echo ""
  echo "## Creating log folder for glint project..."
  echo ""
  
  sudo mkdir -p /var/log/glint
  sudo chown pi:pi /var/log/glint
}

function setupAutoLogin() {
  echo ""
  echo "## Setting up auto-login..."
  echo ""
  
  curl -L https://raw.github.com/normalocity/glint-nes/$GLINTNESBRANCH/scripts/inittab > /tmp/inittab
  sudo mv /etc/inittab /etc/inittab.backup
  sudo mv /tmp/inittab /etc/inittab
}<commit_msg>Removed the use of the `RETROARCH_CONFIG` variable, in an attempt to fix the copying of files in the `glint-nes.sh` script.<commit_after>#!/bin/bash

# Set the glint-nes branch to pull from on github if it isn't already set
if [ -z "$GLINTNESBRANCH" ]
then
  export GLINTNESBRANCH=master
fi

function addCertificatesForRetroarchBinaries() {
  echo ""
  echo "## Adding certificates and apt sources for retroarch..."
  echo ""
  
  sudo apt-get -y install ca-certificates libxv1
  echo "deb http://archive.changeover.za.net/raspbian wheezy main" > changeover.list
  sudo mv changeover.list /etc/apt/sources.list.d/
  sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-key 2747C7CF
}

function aptGetUpdateAndUpgrade() {
  echo ""
  echo "## Updating apt..."
  echo ""
  
  # DON'T call this function BEFORE the addition of the apt-key for retroarch binary, otherwise it will break
  sudo apt-get -y update
  sudo apt-get -y upgrade
}

function installFceuAndRetroarch() {
  echo ""
  echo "## Installing retroarch and fceu..."
  echo ""
  
  sudo apt-get -y install libretro-fceu retroarch
  
  mkdir -p $RETROARCH_CONFIG
  curl -L https://raw.github.com/normalocity/glint-nes/$GLINTNESBRANCH/config/retroarch.cfg > $HOME/.retroarch/retroarch.cfg  
}

function copyUserAndRPiConfigFiles() {
  echo ""
  echo "## Copying user and RPi config files..."
  echo ""
  
  curl -L https://raw.github.com/normalocity/glint-nes/$GLINTNESBRANCH/config/.profile > ~/.profile
  curl -L https://raw.github.com/normalocity/glint-nes/$GLINTNESBRANCH/config/raspberry-pi-config.txt > /tmp/config.txt
  sudo mv /boot/config.txt /boot/config.txt.backup
  sudo mv /tmp/config.txt /boot/config.txt
}

function makeGlintLogFolder() {
  echo ""
  echo "## Creating log folder for glint project..."
  echo ""
  
  sudo mkdir -p /var/log/glint
  sudo chown pi:pi /var/log/glint
}

function setupAutoLogin() {
  echo ""
  echo "## Setting up auto-login..."
  echo ""
  
  curl -L https://raw.github.com/normalocity/glint-nes/$GLINTNESBRANCH/scripts/inittab > /tmp/inittab
  sudo mv /etc/inittab /etc/inittab.backup
  sudo mv /tmp/inittab /etc/inittab
}
{'fraction_non_alphanumeric': 0.12467160257941247, 'fraction_numerical': 0.0016718414139001673, 'mean_word_length': 3.367049009384776, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 14, 'https://': 8, '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': '1737279', 'n_tokens_mistral': 1543, 'n_tokens_neox': 1492, 'n_words': 374}