Skip to content

Commit

Permalink
feat(bash): if statement on bash inputs
Browse files Browse the repository at this point in the history
  • Loading branch information
yoctoyotta1024 committed Apr 11, 2024
1 parent c2aad99 commit 1a166de
Showing 1 changed file with 17 additions and 11 deletions.
28 changes: 17 additions & 11 deletions src/build_compile_cleocoupledsdm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,22 @@ then
fi
### ---------------------------------------------------- ###

### ----------------- build executable --------------- ###
buildcmd="${path2CLEO}/scripts/bash/build_cleo.sh ${buildtype} ${path2CLEO} ${path2build}"
echo ${buildcmd}
${buildcmd}
### ---------------------------------------------------- ###
if [[ "${buildtype}" != "" && "${path2CLEO}" != "" && "${path2build}" != "" &&
"${executable}" != "" && "${path2CLEO}" != "${path2build}" ]]
then
### ----------------- build executable --------------- ###
buildcmd="${path2CLEO}/scripts/bash/build_cleo.sh ${buildtype} ${path2CLEO} ${path2build}"
echo ${buildcmd}
${buildcmd}
### ---------------------------------------------------- ###

### ----------------- compile executable --------------- ###
cd ${path2build} && make clean
### ----------------- compile executable --------------- ###
cd ${path2build} && make clean

compilecmd="${path2CLEO}/scripts/bash/compile_cleo.sh ${path2build} ${executable}"
echo ${compilecmd}
${compilecmd}
### ---------------------------------------------------- ###
compilecmd="${path2CLEO}/scripts/bash/compile_cleo.sh ${path2build} ${executable}"
echo ${compilecmd}
${compilecmd}
### ---------------------------------------------------- ###
else
echo "Bad inputs, please check your buildtype, path2CLEO, path2build and executable names"
fi

0 comments on commit 1a166de

Please sign in to comment.