15 lines
328 B
Bash
Executable File
15 lines
328 B
Bash
Executable File
#!/bin/sh
|
|
set -e
|
|
ex=${1:?$0 <ex??>}
|
|
shift
|
|
rm -f a.out
|
|
find ../${ex} -type f -name '*.h' -exec \
|
|
norminette -R CheckDefine {} \;
|
|
find ../${ex} -type f -name '*.c' \! -name 'main.c' -exec \
|
|
norminette -R CheckForbiddenSourceHeader {} \;
|
|
#gcc ${ex}.c
|
|
gcc -Wall -Wextra -Werror -o a.out ${ex}.c
|
|
echo ${ex}:
|
|
./a.out "$@"
|
|
rm -f a.out
|