From 25259423b5ec72c513f43952442825a1cfd472b6 Mon Sep 17 00:00:00 2001 From: ENGO150 Date: Sun, 1 May 2022 16:29:53 +0200 Subject: [PATCH] moved installing header files before library --- build.sh | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/build.sh b/build.sh index a7cdf3f..18ad10c 100644 --- a/build.sh +++ b/build.sh @@ -44,6 +44,17 @@ if [[ "$1" == "test" ]]; then ########## TEST ########## echo "Output generated as '$output'" ### elif [[ "$1" == "install" ]]; then ########## INSTALL ########## + ### + echo "Installing header files..." + ### + + # Create why2 directory + if [[ ! -d $includeDirectory ]]; then + mkdir $includeDirectory + fi + + cp $includeFiles $includeDirectory + ### echo "Using '$compiler' as default compiler." ### @@ -65,16 +76,10 @@ elif [[ "$1" == "install" ]]; then ########## INSTALL ########## $compiler $flags -o $installOutput *.o ### - echo "Installing..." + echo "Installing library..." ### - # Create why2 directory - if [[ ! -d $includeDirectory ]]; then - mkdir $includeDirectory - fi - mv $installOutput /usr/lib/ - cp $includeFiles $includeDirectory # Compilation failed if [[ $? -ne 0 ]]; then