linutil/core/tabs/applications-setup/Developer-tools/meld-setup.sh

38 lines
864 B
Bash
Raw Normal View History

2024-09-21 15:26:32 +01:00
#!/bin/sh -e
. ../../common-script.sh
2024-10-01 07:13:28 +01:00
checkMeldInstallation() {
case "$PACKAGER" in
pacman|apt-get|nala)
command_exists meld
;;
*)
checkFlatpak
flatpak_app_exists org.gnome.meld
;;
esac
}
2024-09-21 15:26:32 +01:00
installMeld() {
2024-10-01 07:13:28 +01:00
if ! checkMeldInstallation; then
printf "%b\n" "${YELLOW}Installing Meld...${RC}"
case "$PACKAGER" in
pacman)
"$ESCALATION_TOOL" "$PACKAGER" -S --needed --noconfirm meld
;;
apt-get|nala)
"$ESCALATION_TOOL" "$PACKAGER" -y install meld
;;
*)
flatpak install -y flathub org.gnome.meld
;;
esac
else
printf "%b\n" "${GREEN}Meld is already installed.${RC}"
fi
2024-09-21 15:26:32 +01:00
}
checkEnv
checkEscalationTool
installMeld