moved installing header files before library

This commit is contained in:
Václav Šmejkal 2022-05-01 16:29:53 +02:00
parent c95db7aafb
commit 25259423b5

View File

@ -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