Skip to content
This repository was archived by the owner on Aug 21, 2023. It is now read-only.

Commit f63d0fe

Browse files
tdelabroBernardstanislas
authored andcommitted
build: add script that copy patch and test exercises
1 parent 98f31f2 commit f63d0fe

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

scripts/patch_and_test_exercises.sh

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#!/bin/bash
2+
3+
TMP_DIR=".tmp_exercises"
4+
PATCH_DIR=".patches"
5+
6+
mkdir -p $TMP_DIR
7+
8+
cp -R "./exercises/" $TMP_DIR
9+
10+
for section in `ls $PATCH_DIR`
11+
do
12+
for exo in `ls $PATCH_DIR/$section`
13+
do
14+
patch $TMP_DIR/$section/"${exo%.*}" < "$PATCH_DIR/$section/$exo"
15+
mv $TMP_DIR/$section/"${exo%.*}" $TMP_DIR/$section/"test_${exo%.*}"
16+
done
17+
done
18+
19+
protostar test $TMP_DIR
20+
21+
rm -rf $TMP_DIR

0 commit comments

Comments
 (0)