Skip to content
Snippets Groups Projects
Commit ea870a17 authored by Pietro Incardona's avatar Pietro Incardona
Browse files

Adapting the install script for arch linux cmake

parent b5ca8512
No related branches found
No related tags found
No related merge requests found
......@@ -47,6 +47,12 @@ function discover_package_manager() {
if [ $? -eq 0 ]; then
discover_package_manager_ret="zypper"
return
fi
command -v pacman >/dev/null
if [ $? -eq 0 ]; then
discover_package_manager_ret="pacman"
return
else
discover_package_manager_ret=""
return
......@@ -54,4 +60,11 @@ function discover_package_manager() {
fi
}
echo "$discover_package_manager_ret"
function pc_install_command() {
if [ x"$1" == x"pacman" ]; then
pc_install_command_ret="pacman -Sy"
else
pc_install_command_ret="$1 install"
fi
}
......@@ -15,8 +15,9 @@ if [ x"$1" = x"osx" ]; then
commands[0]="$pcman install cmake"
possible_solutions "${commands[@]}"
elif [ x"$1" = x"linux" ]; then
commands[0]="su -c \"$pcman install cmake\""
commands[1]="sudo $pcman install cmake"
pc_install_command $pcman
commands[0]="su -c \"$pc_install_command_ret cmake\""
commands[1]="sudo $pc_install_command_ret cmake"
possible_solutions "${commands[@]}"
fi
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment