]> Repositories - Adafruit_Blinka-hackapet.git/commitdiff
Suppress errors from ampy mkdir where directory exists
authorCefn Hoile <github.com@cefn.com>
Mon, 19 Feb 2018 20:52:08 +0000 (20:52 +0000)
committerCefn Hoile <github.com@cefn.com>
Mon, 19 Feb 2018 20:52:08 +0000 (20:52 +0000)
python/upload_feather_huzzah_circuitpython_put.sh
python/upload_feather_huzzah_micropython_put.sh

index 5a4b91ab9d7af293bec327d6db0e01ced2f294bb..100ab1516f598635957d1444bdd1af57cad916df 100755 (executable)
@@ -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
index 3a6cb0e0b717e5c623de2fb6f7d543948b2345a7..0f201181279e777186a346e3ec5ca9f4871a1957 100755 (executable)
@@ -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