diff --git a/util/flash_BBB.sh b/util/flash_BBB.sh index 60eb8bbe1b004d7bdf431c9dc2dbfe7be4bbb3e4..f8102e1a7b9a285f4f490ffcac52db3df8ac799e 100755 --- a/util/flash_BBB.sh +++ b/util/flash_BBB.sh @@ -47,12 +47,21 @@ if [ "{flag}"=true ]; then } || { # catch # save log for exception flag=false - printf "${RED}Could not send folder /${project} to the BBB, aborting!${NC}\n" + printf "${RED}Could not send project /${project} to the BBB, aborting!${NC}\n" } done fi -printf "${BLUE}Connecting to the BBB${NC}\n" +printf "${BLUE}Deleting temporary files...${NC}\n" +for project in "${projects[@]}"; do + { + rm -rf ${project} + } || { + printf "${RED}Could not delete project /${project}, aborting!${NC}\n" +} +done + +printf "${BLUE}Connecting to the BBB...${NC}\n" { ssh -t debian@192.168.7.2 "./LabConnection.jl/util/startup.sh; bash -l" } || { diff --git a/util/flash_BBB.sh~ b/util/flash_BBB.sh~ index 60eb8bbe1b004d7bdf431c9dc2dbfe7be4bbb3e4..f8102e1a7b9a285f4f490ffcac52db3df8ac799e 100755 --- a/util/flash_BBB.sh~ +++ b/util/flash_BBB.sh~ @@ -47,12 +47,21 @@ if [ "{flag}"=true ]; then } || { # catch # save log for exception flag=false - printf "${RED}Could not send folder /${project} to the BBB, aborting!${NC}\n" + printf "${RED}Could not send project /${project} to the BBB, aborting!${NC}\n" } done fi -printf "${BLUE}Connecting to the BBB${NC}\n" +printf "${BLUE}Deleting temporary files...${NC}\n" +for project in "${projects[@]}"; do + { + rm -rf ${project} + } || { + printf "${RED}Could not delete project /${project}, aborting!${NC}\n" +} +done + +printf "${BLUE}Connecting to the BBB...${NC}\n" { ssh -t debian@192.168.7.2 "./LabConnection.jl/util/startup.sh; bash -l" } || {