-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathmake-src
More file actions
executable file
·32 lines (29 loc) · 813 Bytes
/
Copy pathmake-src
File metadata and controls
executable file
·32 lines (29 loc) · 813 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/bin/bash
#
# Build output files in the src/ subfolder. A Makefile has to be part of
# the src/ subfolder.
# If no argument, go through all category folders in the $categories
# variable (defined in config).
# If one or more arguments, go through all of them (they are challenge
# folders.
# Load configuration (used by other scripts).
source config
# Build challenge. Function argument is path to challenge folder.
make_challenge()
{
challenge_path="$1"
if test -d "$challenge_path"/src; then
make -C "$challenge_path"/src
fi
}
if test $# -eq 0; then
for categ in $categories; do
for challenge_path in "$categ"/*; do
make_challenge "$challenge_path"
done
done
else
for challenge_path in $@; do
make_challenge "$challenge_path"
done
fi