mirror of
https://github.com/ChrisTitusTech/linutil.git
synced 2024-11-05 21:28:48 +00:00
216f1a4836
* BIG CHANGES * core metadata * Added readme.md to the package * Moved the crate back to tui Co-authored-by: Liam <lj3954@users.noreply.github.com> --------- Co-authored-by: Liam <lj3954@users.noreply.github.com>
33 lines
1014 B
Bash
33 lines
1014 B
Bash
#!/bin/sh -e
|
|
|
|
. ../common-script.sh
|
|
|
|
installFastfetch() {
|
|
printf "%b\n" "${YELLOW}Installing Fastfetch...${RC}"
|
|
if ! command_exists fastfetch; then
|
|
case "$PACKAGER" in
|
|
pacman)
|
|
"$ESCALATION_TOOL" "$PACKAGER" -S --needed --noconfirm fastfetch
|
|
;;
|
|
*)
|
|
"$ESCALATION_TOOL" "$PACKAGER" install -y fastfetch
|
|
;;
|
|
esac
|
|
else
|
|
printf "%b\n" "${GREEN}Fastfetch is already installed.${RC}"
|
|
fi
|
|
}
|
|
|
|
setupFastfetchConfig() {
|
|
printf "%b\n" "${YELLOW}Copying Fastfetch config files...${RC}"
|
|
if [ -d "${HOME}/.config/fastfetch" ] && [ ! -d "${HOME}/.config/fastfetch-bak" ]; then
|
|
cp -r "${HOME}/.config/fastfetch" "${HOME}/.config/fastfetch-bak"
|
|
fi
|
|
mkdir -p "${HOME}/.config/fastfetch/"
|
|
curl -sSLo "${HOME}/.config/fastfetch/config.jsonc" https://raw.githubusercontent.com/ChrisTitusTech/mybash/main/config.jsonc
|
|
}
|
|
|
|
checkEnv
|
|
checkEscalationTool
|
|
installFastfetch
|
|
setupFastfetchConfig |