summarylogtreecommitdiffstats
path: root/dependencies.sh
blob: 1cc16f3d4dd988a2f2d910d9dc7ed02f4656fcc8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/bin/bash

# Function to load configuration from file
load_config() {
    source "$config_file"
}

# Check if configuration file exists
if [ ! -f "$config_file" ]; then
    perform_init
    exit 0
fi

# Load configuration
load_config

# Function to install dependencies based on user input
install_dependencies() {
    case $1 in
        "paru")
            if ! command -v paru &> /dev/null; then
                git clone https://aur.archlinux.org/paru.git
                cd paru || exit
                makepkg -si --noconfirm
                cd .. || exit
                rm -rf paru
            fi
            ;;
        "yay")
            if ! command -v yay &> /dev/null; then
                sudo pacman -S --needed --noconfirm yay
            fi
            ;;
        *)
            echo "Invalid AUR helper selected. Using pacman as default."
            ;;
    esac
}