Skip to content

Commit d4f7a91

Browse files
committed
fix making mpy files, so it doesn't screw your whole directory
1 parent 8d97d44 commit d4f7a91

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

tests/make_generated_mpy.sh

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,16 @@
11
#!/bin/bash
22

3+
mkdir -p _build/generated
4+
mkdir -p _build/compiled
5+
36
for thingy in `find _build/generated`; do
47
if [[ "$thingy" == *.py ]]; then
58
echo $thingy
6-
cp "$thingy" "_build/compiled/"
9+
mpy-cross $thingy
10+
MPYNAME=`echo $thingy | sed -e 's/\.py$/.mpy/'`
11+
mv "$MPYNAME" "_build/compiled/"
712
fi
813
done
9-
cp libraries/common/keyboard_layout.py "_build/compiled/"
1014

11-
cd _build/compiled
12-
for thingy in `find .`; do
13-
if [[ "$thingy" == *.py ]]; then
14-
mpy-cross "$thingy"
15-
rm "$thingy"
16-
fi
17-
done
15+
mpy-cross libraries/common/keyboard_layout.py
16+
mv libraries/common/keyboard_layout.mpy "_build/compiled/"

0 commit comments

Comments
 (0)