#!/bin/bash

DIRECTORY="$(dirname "$(dirname "$( cd "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )")")"

function error {
  echo -e "\\e[91m$1\\e[39m"
  exit 1
}

#Downloading Deb File For FreeTube
rm -f ~/freetube.deb
wget https://archive.org/download/freetube_0.11.2_armv7l/freetube_0.11.2_armv7l.deb -O ~/freetube.deb || error "Failed to download freetube.deb!"

#Installing FreeTube
sudo apt install -y --fix-missing ~/freetube.deb || error "APT failed to install freetube.deb!"

#Removing Deb File
rm -f ~/freetube.deb
