ammended compile.sh and .gitignore

This commit is contained in:
celso 2022-11-09 23:46:47 -03:00
parent f6ed1a2723
commit 0fb59f4859
2 changed files with 3 additions and 1 deletions

1
.gitignore vendored
View File

@ -1 +1,2 @@
test.c
test

View File

@ -1,4 +1,5 @@
#!/bin/bash
[ "${1}" == "clean" ] && rm $(ls --color=no -1 | grep -v "\(\.c\|\.sh\)$") && exit
[ -z "${1}" ] && echo "error: no arguments given" && exit 2
[ "${1}" == "clean" ] && rm -v $(ls --color=no -1 | grep -v "\(\.c\|\.sh\)$") && exit
gcc -Wall -Wextra -O2 -g -o "${1:0:-2}" "${1}"
exit