From b023f105ace1c607f8b556786cd637a2297a0350 Mon Sep 17 00:00:00 2001 From: Nyx <144965845+nnyyxxxx@users.noreply.github.com> Date: Mon, 30 Sep 2024 16:47:31 -0400 Subject: [PATCH] refactor meld (#644) * refactor meld * rename task * add support for deb based distros * add i Co-authored-by: Adam Perkowski --------- Co-authored-by: nnyyxxxx Co-authored-by: Adam Perkowski --- .../Developer-tools/meld-setup.sh | 21 ++++++++++++++++--- core/tabs/applications-setup/tab_data.toml | 2 +- 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/core/tabs/applications-setup/Developer-tools/meld-setup.sh b/core/tabs/applications-setup/Developer-tools/meld-setup.sh index 8881ba1f..bd0bb3c2 100644 --- a/core/tabs/applications-setup/Developer-tools/meld-setup.sh +++ b/core/tabs/applications-setup/Developer-tools/meld-setup.sh @@ -3,10 +3,25 @@ . ../../common-script.sh installMeld() { - cd "$HOME" && git clone https://gitlab.gnome.org/GNOME/meld.git - echo "PATH=\$PATH:$HOME/meld/bin" | "$ESCALATION_TOOL" tee -a /etc/environment + if ! command_exists meld; 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 + ;; + *) + . ../setup-flatpak.sh + flatpak install -y flathub org.gnome.meld + ;; + esac + else + printf "%b\n" "${GREEN}Meld is already installed.${RC}" + fi } checkEnv checkEscalationTool -installMeld +installMeld \ No newline at end of file diff --git a/core/tabs/applications-setup/tab_data.toml b/core/tabs/applications-setup/tab_data.toml index 141772bf..f6e982c1 100644 --- a/core/tabs/applications-setup/tab_data.toml +++ b/core/tabs/applications-setup/tab_data.toml @@ -37,7 +37,7 @@ task_list = "I" name = "Meld" description = "Meld is a visual diff and merge tool that helps compare files, directories, and version-controlled projects." script = "Developer-tools/meld-setup.sh" -task_list = "I" +task_list = "I FI" [[data.entries]] name = "Ngrok"