From: Cefn Hoile Date: Mon, 19 Feb 2018 20:52:08 +0000 (+0000) Subject: Suppress errors from ampy mkdir where directory exists X-Git-Tag: 0.1.0~4^2~65 X-Git-Url: https://git.ayoreis.com/Adafruit_Blinka-hackapet.git/commitdiff_plain/d9dcc0b0776b0ce772a3f44b74ff2315d7be43f7 Suppress errors from ampy mkdir where directory exists --- 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