From c9a9ed83059169d91720865fe101575f2a408462 Mon Sep 17 00:00:00 2001 From: Johannes Theiner Date: Tue, 29 Oct 2019 13:48:27 +0100 Subject: [PATCH] update for cleaner code --- checkout-dev.sh | 0 install.sh | 11 +++++------ 2 files changed, 5 insertions(+), 6 deletions(-) mode change 100644 => 100755 checkout-dev.sh diff --git a/checkout-dev.sh b/checkout-dev.sh old mode 100644 new mode 100755 diff --git a/install.sh b/install.sh index 233e961..736219a 100755 --- a/install.sh +++ b/install.sh @@ -1,6 +1,5 @@ -#!/bin/bash +#!/usr/bin/env bash -# get operating system install_packages() { declare -A osInfo; osInfo[/usr/bin/pacman]=pacman @@ -11,10 +10,10 @@ install_packages() { do if [[ -f $f ]];then if [[ ${osInfo[$f]} == 'pacman' ]]; then - pacman -S clang make cmake fltk catch2 + sudo pacman -S clang make cmake fltk catch2 elif [[ ${osInfo[$f]} == 'apt' ]]; then - apt install clang make cmake clang-tidy libfltk1.3 libfltk1.3-dev + sudo apt install clang make cmake clang-tidy libfltk1.3 libfltk1.3-dev git clone https://github.com/catchorg/Catch2.git cd Catch2 @@ -22,7 +21,7 @@ install_packages() { sudo cmake --build build/ --target install elif [[ ${osInfo[$f]} == 'brew' ]]; then - brew install llvm clang make cmake clang-format fltk catch2 + sudo brew install llvm clang make cmake clang-format fltk catch2 fi fi @@ -59,4 +58,4 @@ mkdir demo/build cd installation echo "installation completed" -./build.sh \ No newline at end of file +./build.sh