template_setup/022-Fastfetch_Ubuntu_Repo.sh
2024-05-23 20:01:11 -04:00

22 lines
568 B
Bash

#!/bin/bash
## Script Location
SCRIPTDIR=$(dirname $0)
source "$SCRIPTDIR/common/colors.sh"
source "$SCRIPTDIR/common/functions.sh"
source "$SCRIPTDIR/common/load-defaults.sh"
#distro=$( get_distro )
#if [ $distro == *"Ubuntu"* ]
#then
if [ -d /etc/apt/apt.conf.d ]
then
ppa_added=`grep ^ /etc/apt/sources.list /etc/apt/sources.list.d/* | grep -v list.save | grep -v deb-src | grep deb | grep fastfetch | wc -l`
if [ $ppa_added == 0 ]
then
sudo add-apt-repository ppa:zhangsongcui3371/fastfetch -y
else
echo "fastfetch ppa already installed"
fi
fi