Added run_scripts exercises

This commit is contained in:
Fabio Scotto di Santolo
2025-07-07 18:01:53 +02:00
parent a3ad418d82
commit 32acc0954f
5 changed files with 165 additions and 0 deletions

View File

@@ -0,0 +1,24 @@
# Makefile for sequential script executor project
CC = gcc
CFLAGS = -Wall -Wextra -std=c11 -g
TARGET = run_scripts
SRC = main.c
.PHONY: all clean run test valgrind
all: $(TARGET)
$(TARGET): $(SRC)
$(CC) $(CFLAGS) -o $@ $^
run: $(TARGET)
./$(TARGET) tests/hello.sh tests/fail.sh
test: run
valgrind: $(TARGET)
valgrind --leak-check=full ./$(TARGET) scripts/test1.sh scripts/test2.sh
clean:
rm -f $(TARGET)