Skip to content

Commit

Permalink
feat: add protection to run
Browse files Browse the repository at this point in the history
  • Loading branch information
PedroFnseca committed Aug 29, 2023
1 parent 9323e4f commit ac10dd8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
8 changes: 2 additions & 6 deletions build.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
#!/bin/bash

set -e

mkdir -p bin

gcc -o bin/main src/main.c -lmicrohttpd

if [ $? -eq 0 ]; then
echo "Compilação bem-sucedida."
else
echo "Erro durante a compilação."
fi
4 changes: 3 additions & 1 deletion main_run.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
#!/bin/bash

set -e

./build.sh

echo "Executando o programa..."

./bin/main
./bin/main

0 comments on commit ac10dd8

Please sign in to comment.