35 lines
734 B
Bash
Executable File
35 lines
734 B
Bash
Executable File
#!/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/
|
|
cp -rv ./assets/ ~/.beluga/
|
|
cp -rv ./config/ ~/.beluga/
|
|
|
|
# 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"
|