Skip to content

Commit

Permalink
Try to get folders inside script
Browse files Browse the repository at this point in the history
  • Loading branch information
deniscostadsc committed Jan 4, 2024
1 parent 0ced15e commit 00235ae
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions scripts/docker/run-c.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,13 @@ echo
echo "C"
echo

for folder in $FOLDERS; do
FOLDERS=$(find . -name 'problem.md' | sed 's/problem.md//g' | sort)

for folder in ${FOLDERS}; do
[ -f "${folder}WRONG" ] && continue

if [ "$(find "$folder" -name '*.c' | wc -l)" -eq 1 ]; then
echo "$folder"
if [[ "$(find "$folder" -name '*.c' | wc -l)" -eq 1 ]]; then
echo "$folder"
cd "$folder" || exit 1

gcc -Werror -std=c99 -O2 -lm ./*.c
Expand Down

0 comments on commit 00235ae

Please sign in to comment.