script-linux/rls

22 lines
370 B
Bash
Executable File

#!/bin/bash
# compile un programme en c++ en mode release
if [ $1 != "" ]; then
cd $1
fi
project=$(grep "^\(project(\)" CMakeLists.txt) || exit
project=${project#project(}
project=${project%% *}
cd $(pwd)/build
cmake -DCMAKE_BUILD_TYPE=Release ..
make
figlet "noice" | lolcat
echo -n "lunch $project ? (y/n) "
read input
if [[ input -eq "y" ]]; then
./$project
fi