#! /bin/bash function solve_gpp() { 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 gcc49" commands[1]="echo \"Continue without installing\"" possible_solutions "${commands[@]}" compiler_opt=" CXX=g++-4.9 CC=gcc-4.9 " compiler_gcc="gcc-4.9" compiler_gpp="g++-4.9" elif [ x"$1" = x"linux" ]; then commands[0]="su -c \"$pcman install gcc-c++\"" commands[1]="sudo $pcman install gcc-c++" possible_solutions "${commands[@]}" compiler_gcc="gcc" compiler_gpp="g++" fi }