Update to include fastfetch and remove neofetch
This commit is contained in:
28
update.sh
28
update.sh
@@ -39,6 +39,10 @@ cat <<EOF > /etc/profile.d/gaunt_custom_bash.sh
|
||||
export HISTTIMEFORMAT="%F %T "
|
||||
EOF
|
||||
|
||||
# fastfetch
|
||||
# download srouce code of latest releases page
|
||||
FASTFETCH_RELEASES_API=$(wget -O - https://api.github.com/repos/fastfetch-cli/fastfetch/releases/latest)
|
||||
|
||||
# Debian OS
|
||||
if [ ${OS} == "Debian" ] || [ ${OS} == "Ubuntu" ]; then
|
||||
|
||||
@@ -67,6 +71,11 @@ if [ ${OS} == "Debian" ] || [ ${OS} == "Ubuntu" ]; then
|
||||
apt install -y qemu-guest-agent
|
||||
fi
|
||||
|
||||
# FastFetch install
|
||||
#FASTFETCH_FILENAME="fastfetch-linux-amd64.deb"
|
||||
DOWNLOAD_URL=$(echo ${FASTFETCH_RELEASES_API} | jq -r '.assets[].browser_download_url | select(. | endswith("fastfetch-linux-amd64.deb"))')
|
||||
wget -P /tmp ${DOWNLOAD_URL}
|
||||
apt install --yes /tmp/fastfetch-linux-amd64.deb
|
||||
|
||||
# remove unneeded packages
|
||||
apt autoremove -y
|
||||
@@ -147,6 +156,13 @@ elif [ "${OS}" == "CentOS" ] || [ "${OS}" == "Rocky" ]; then
|
||||
if [ "${KVM}" == "true" ]; then
|
||||
dnf install -y qemu-guest-agent
|
||||
fi
|
||||
|
||||
# FastFetch install
|
||||
#FASTFETCH_FILENAME="fastfetch-linux-amd64.deb"
|
||||
DOWNLOAD_URL=$(echo ${FASTFETCH_RELEASES_API} | jq -r '.assets[].browser_download_url | select(. | endswith("fastfetch-linux-amd64.rpm"))')
|
||||
wget -P /tmp ${DOWNLOAD_URL}
|
||||
dnf install -y /tmp/fastfetch-linux-amd64.rpm
|
||||
|
||||
fi
|
||||
|
||||
# modify ssh to allow root login and then restart the service
|
||||
@@ -176,17 +192,5 @@ else
|
||||
git clone https://git.johnhgaunt.com/jgaunt/homelab-scripts
|
||||
fi
|
||||
|
||||
# install neofetch
|
||||
if [ -d /opt/neofetch ]; then
|
||||
cd /opt/neofetch
|
||||
git pull --ff-only
|
||||
make install
|
||||
else
|
||||
cd /opt
|
||||
git clone https://github.com/dylanaraps/neofetch
|
||||
cd /opt/neofetch
|
||||
make install
|
||||
fi
|
||||
|
||||
# go to home directory
|
||||
cd ~
|
||||
|
||||
Reference in New Issue
Block a user