#!/bin/bash echo "--- Welcome to Beluga installer ---" read -p "Do you want to start the installation ? (Y/n)" confirm && [[ $confirm == [yY] || $confirm == [yY][eE][sS] ]] || exit 1 # Check dependencies if ! command -v "meson" &>/dev/null; then echo "❌ Error: meson not found. Please install it first." exit 1 fi # Create config files echo "Create config files ..." mkdir -pv ~/.beluga/ mkdir -pv ~/.beluga/assets/ cp -rv ./assets/beluga.txt ~/.beluga/assets/ mkdir -pv ~/.beluga/packages/ mkdir -pv ~/.beluga/config/ read -p "Do you want to replace your config file or keep it (init.lisp.bak) / (init.lisp.new) ? (Y/n)" confirm if [[ "$confirm" =~ ^[Yy]$ ]]; then mv ~/.beluga/config/init.lisp ~/.beluga/config/init.lisp.bak cp -rv ./config/init.lisp ~/.beluga/config/ else cp -rv ./config/init.lisp ~/.beluga/config/init.lisp.new fi # Compile the project echo "Start compilation ..." meson setup build/ meson compile -C build/ # Add to path echo "Adding beluga to the path" sudo cp -f ./build/beluga /usr/local/bin/ echo "Installation finish" echo "Check ~/.beluga/config/init.lisp for customization"