c_exercises/compile.sh

5 lines
147 B
Bash
Executable File

#!/bin/bash
[ "${1}" == "clean" ] && rm $(ls --color=no -1 | grep -v "\(\.c\|\.sh\)$") && exit
gcc -Wall -Wextra -O2 -g -o "${1:0:-2}" "${1}"
exit