[scripts] fix: maker cpp project handling

This commit is contained in:
David JULIEN 2021-11-20 15:44:39 +01:00
parent bf676aa089
commit 46fdc12c29
1 changed files with 3 additions and 3 deletions

View File

@ -11,15 +11,15 @@
###################################################################### ######################################################################
headers_list="$(ls | grep '.h$')" headers_list="$(ls | grep '\.hp*$')"
sources_list="$(ls | grep '.cp*$')" sources_list="$(ls | grep '\.cp*$')"
modules_list="$(printf "\n$sources_list" | sed 's/\.cp*//g' | tr '\n' ' ')" modules_list="$(printf "\n$sources_list" | sed 's/\.cp*//g' | tr '\n' ' ')"
targets_list="$(printf "\n$sources_list" | sed 's/\.cp*/\.o/g' | tr '\n' ' ')" targets_list="$(printf "\n$sources_list" | sed 's/\.cp*/\.o/g' | tr '\n' ' ')"
get_compiler(){ get_compiler(){
for source_ in "$sources_list"; do for source_ in "$sources_list"; do
case "$source_" in case "$source_" in
*.cpp) comp="g++" && return;; *.cpp) comp="g++";;
*.c) comp="gcc";; *.c) comp="gcc";;
esac esac
done done