From f30387bd4a7db2d27d43e7a281828e64a6f5083d Mon Sep 17 00:00:00 2001
From: Ethan Robert <ethan.rbrt90@gmail.com>
Date: Thu, 13 Mar 2025 14:30:13 +0100
Subject: [PATCH] Finished UNIX install script

---
 install-unix.sh | 43 +++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 43 insertions(+)

diff --git a/install-unix.sh b/install-unix.sh
index e69de29..a5c477a 100755
--- a/install-unix.sh
+++ b/install-unix.sh
@@ -0,0 +1,43 @@
+#!/bin/bash
+
+echo "To install grapp, you first need to authenticate as root"
+sudo test
+
+echo "Installing Graphviz..."
+
+if [[ "$OSTYPE" == "darwin"* ]]; then
+    # macOS
+    brew install graphviz wget
+elif [[ -f /etc/debian_version ]]; then
+    # Debian/Ubuntu
+    sudo apt update
+    sudo apt install -y graphviz wget unzip
+elif [[ -f /etc/arch-release ]]; then
+    # Arch
+    sudo pacman -Syu --noconfirm graphviz wget unzip
+elif [[ -f /etc/fedora-release ]]; then
+    # Fedora
+    sudo dnf install -y graphviz wget unzip
+else
+    echo "Unsupported OS"
+    exit 1
+fi
+
+echo "Getting the latest version of Grapp..."
+wget https://gitlab.univ-lille.fr/iovka.boneva/grapp/-/raw/master/binaries/Grapp.zip?ref_type=heads&inline=false
+
+echo "Extracting Grapp.zip..."
+unzip Grapp.zip
+
+sudo mv ./Grapp /opt/grapp
+
+echo "Configuring installation..."
+
+if [[ "$SHELL" == *"zsh" ]]; then 
+    # ZSH
+    echo "export PATH='/opt/grapp/bin:$PATH" >> ~/.zshrc
+else if [[ "$SHELL" == *"bash" ]]; then
+    # Bash
+    echo "export PATH='/opt/grapp/bin:$PATH" >> ~/.bashrc
+fi
+
-- 
GitLab