From d9dcc0b0776b0ce772a3f44b74ff2315d7be43f7 Mon Sep 17 00:00:00 2001 From: Cefn Hoile Date: Mon, 19 Feb 2018 20:52:08 +0000 Subject: [PATCH] Suppress errors from ampy mkdir where directory exists --- python/upload_feather_huzzah_circuitpython_put.sh | 2 +- python/upload_feather_huzzah_micropython_put.sh | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/python/upload_feather_huzzah_circuitpython_put.sh b/python/upload_feather_huzzah_circuitpython_put.sh index 5a4b91a..100ab15 100755 --- a/python/upload_feather_huzzah_circuitpython_put.sh +++ b/python/upload_feather_huzzah_circuitpython_put.sh @@ -5,7 +5,7 @@ PORT=/dev/ttyUSB0 find testing -type d | \ grep -v -E "(.(git|idea|vscode)|__pycache__)" | \ grep -v -E '^testing/implementation/micropython*' | \ - xargs -n1 -I {} sh -c "echo Creating directory {} ...; ampy --port ${PORT} mkdir {}" + xargs -n1 -I {} sh -c "echo Creating directory {} ...; ampy --port ${PORT} mkdir --exists-okay {}" # put top-level modules in place for NAME in agnostic unittest diff --git a/python/upload_feather_huzzah_micropython_put.sh b/python/upload_feather_huzzah_micropython_put.sh index 3a6cb0e..0f20118 100755 --- a/python/upload_feather_huzzah_micropython_put.sh +++ b/python/upload_feather_huzzah_micropython_put.sh @@ -2,7 +2,9 @@ PORT=/dev/ttyUSB0 # filter directories, and create relevant ones on the board -find . -mindepth 1 -type d | grep -v -E "(.(git|idea|vscode)|__pycache__)" | xargs -n1 ampy --port ${PORT} mkdir +find testing -type d | \ + grep -v -E "(.(git|idea|vscode)|__pycache__)" | \ + xargs -n1 -I {} sh -c "echo Creating directory {} ...; ampy --port ${PORT} mkdir --exists-okay {}" # put top-level modules in place for NAME in agnostic unittest -- 2.49.0