File tree Expand file tree Collapse file tree 1 file changed +19
-14
lines changed Expand file tree Collapse file tree 1 file changed +19
-14
lines changed Original file line number Diff line number Diff line change @@ -33,20 +33,25 @@ function deploy() {
33
33
rm -rf " _build/"
34
34
mkdir " _build/"
35
35
36
- # Compile .py files to .mpy and move to _build
37
- for file in lib/* .py lib/** /* .py; do
38
- path_without_extension=$( echo " $file " | cut -f 1 -d ' .' )
39
- mpy_path=" $path_without_extension .mpy"
40
- echo " $file -> $mpy_path "
41
- mpy_cross $file
42
- mkdir -p " $( dirname " _build/$file " ) "
43
- mv -f -v " $mpy_path " " _build/$mpy_path "
44
- done
45
-
46
- # Copy subject and any remaining .mpy files to _build
47
- for file in " $subject " lib/* .mpy lib/** /* .mpy; do
48
- cp -v " $file " " _build/$file "
49
- done
36
+ if [ -z " $( alias | grep mpy_cross) " ]; then
37
+ # Plain copy stuff to _build, w/o actually building
38
+ cp -r " $subject " lib _build
39
+ else
40
+ # Compile .py files to .mpy and move to _build
41
+ for file in lib/* .py lib/** /* .py; do
42
+ path_without_extension=$( echo " $file " | cut -f 1 -d ' .' )
43
+ mpy_path=" $path_without_extension .mpy"
44
+ echo " $file -> $mpy_path "
45
+ mpy_cross $file
46
+ mkdir -p " $( dirname " _build/$file " ) "
47
+ mv -f -v " $mpy_path " " _build/$mpy_path "
48
+ done
49
+
50
+ # Copy subject and any remaining .mpy files to _build
51
+ for file in " $subject " lib/* .mpy lib/** /* .mpy; do
52
+ cp -v " $file " " _build/$file "
53
+ done
54
+ fi
50
55
51
56
# Sync subject
52
57
rsync \
You can’t perform that action at this time.
0 commit comments