From 5a87d732cd9e7f558350d3875c11e81fec50f992 Mon Sep 17 00:00:00 2001 From: vegano1 Date: Mon, 10 Apr 2023 14:49:02 -0400 Subject: [PATCH 1/2] fix(app-shell-odd): make sure there is enough space on device before copying app tar file. --- app-shell-odd/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app-shell-odd/Makefile b/app-shell-odd/Makefile index 5920b769e8c..1ac64e17ccb 100644 --- a/app-shell-odd/Makefile +++ b/app-shell-odd/Makefile @@ -70,7 +70,7 @@ dist-ot3: package-deps .PHONY: push-ot3 push-ot3: dist-ot3 tar -zcvf opentrons-robot-app.tar.gz -C ./dist/linux-arm64-unpacked/ ./ - ssh $(ssh_opts) root@$(host) "mount -o remount,rw / && systemctl stop opentrons-robot-app && rm -rf /opt/opentrons-app && mkdir -p /opt/opentrons-app" + ssh $(ssh_opts) root@$(host) "rm -rf opentrons-robot-app.tar.gz && mount -o remount,rw / && systemctl stop opentrons-robot-app && rm -rf /opt/opentrons-app && mkdir -p /opt/opentrons-app" scp -r $(ssh_opts) ./opentrons-robot-app.tar.gz root@$(host): ssh $(ssh_opts) root@$(host) "tar -xvf opentrons-robot-app.tar.gz -C /opt/opentrons-app/ && mount -o remount,ro / && systemctl start opentrons-robot-app" rm -rf opentrons-robot-app.tar.gz From 5e76da556850b57f2b832487603efc1475376be6 Mon Sep 17 00:00:00 2001 From: vegano1 Date: Mon, 10 Apr 2023 18:05:40 -0400 Subject: [PATCH 2/2] delete device files after scping files, in case the operation fails midway. --- app-shell-odd/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app-shell-odd/Makefile b/app-shell-odd/Makefile index 1ac64e17ccb..cb99a70ae46 100644 --- a/app-shell-odd/Makefile +++ b/app-shell-odd/Makefile @@ -70,9 +70,9 @@ dist-ot3: package-deps .PHONY: push-ot3 push-ot3: dist-ot3 tar -zcvf opentrons-robot-app.tar.gz -C ./dist/linux-arm64-unpacked/ ./ - ssh $(ssh_opts) root@$(host) "rm -rf opentrons-robot-app.tar.gz && mount -o remount,rw / && systemctl stop opentrons-robot-app && rm -rf /opt/opentrons-app && mkdir -p /opt/opentrons-app" scp -r $(ssh_opts) ./opentrons-robot-app.tar.gz root@$(host): - ssh $(ssh_opts) root@$(host) "tar -xvf opentrons-robot-app.tar.gz -C /opt/opentrons-app/ && mount -o remount,ro / && systemctl start opentrons-robot-app" + ssh $(ssh_opts) root@$(host) "mount -o remount,rw / && systemctl stop opentrons-robot-app && rm -rf /opt/opentrons-app && mkdir -p /opt/opentrons-app" + ssh $(ssh_opts) root@$(host) "tar -xvf opentrons-robot-app.tar.gz -C /opt/opentrons-app/ && mount -o remount,ro / && systemctl start opentrons-robot-app && rm -rf opentrons-robot-app.tar.gz" rm -rf opentrons-robot-app.tar.gz # development