diff --git a/install-unix.sh b/install-unix.sh index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..a5c477a7ca0e72ca65e82bbfc3c0a39a8fc22915 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 +