lundi 19 octobre 2020

How to write a shell script to run a Makefile?

I want to make a shell script to run a Makefile.

If I tap this command ./run.sh bonus, The Rule bonus will be applied.

but if I wrote this ./run.sh, the command make will apply.

I try This script but every time the command make apply.

make fclean
if [$1 == "bonus"];
then
    echo "make bonus"
else
    echo "make"
fi
make clean
./cub3D maps/1.cub

Aucun commentaire:

Enregistrer un commentaire