solve_cmake 755 Bytes
Newer Older
incardon's avatar
incardon committed
1
2

#! /bin/bash 
incardon's avatar
incardon committed
3
4

function solve_cmake() {        
incardon's avatar
incardon committed
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
source script/show_solutions
source script/discover_package_manager
discover_package_manager $1
pcman=$discover_package_manager_ret

if [ x"$pcman" = x"" ]; then
        exit 1
fi

if [ x"$1" = x"osx" ]; then 
        commands[0]="$pcman install cmake"
        possible_solutions "${commands[@]}"
        echo "Executing: ${command[$possible_solutions_ret]}"
        eval ${commands[$possible_solutions_ret]}
elif [ x"$1" = x"linux"  ]; then
        commands[0]="su -c \"$pcman install cmake\""
        commands[1]="sudo $pcman install cmake"
        possible_solutions "${commands[@]}"
        echo "Executing: ${command[$possible_solutions_ret]}"
        eval ${commands[$possible_solutions_ret]}
fi 
incardon's avatar
incardon committed
26
}
incardon's avatar
incardon committed
27