From 4c84bb588ba23d62fce338286fad60c5be72a5fd Mon Sep 17 00:00:00 2001 From: Raffaello Bonghi Date: Thu, 29 Nov 2018 23:03:45 +0100 Subject: [PATCH] Improve copy folders --- biddibi_boddibi_boo.sh | 5 +++-- include/remote.sh | 10 ++-------- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/biddibi_boddibi_boo.sh b/biddibi_boddibi_boo.sh index 927d0ae..9513c65 100755 --- a/biddibi_boddibi_boo.sh +++ b/biddibi_boddibi_boo.sh @@ -1,4 +1,4 @@ -#!/bin/bash --init-file +#!/bin/bash # Copyright (C) 2018, Raffaello Bonghi # All rights reserved # @@ -190,7 +190,8 @@ main() echo "Jetson folder does not exist!" echo "Download informations" git clone https://github.com/rbonghi/jetson_stats.git jetson - else + fi + if [ -z $MODULE_IM_HOST ] ; then echo "Check updates for jetson stats ..." cd jetson git pull diff --git a/include/remote.sh b/include/remote.sh index 951d2ff..5416f7d 100644 --- a/include/remote.sh +++ b/include/remote.sh @@ -116,15 +116,9 @@ remote_load_to_host() if [ -d /tmp/jetson_easy ] ; then rm -R /tmp/jetson_easy fi - # build a folder - mkdir -p /tmp/jetson_easy + # Copy all folders - cp -rf include /tmp/jetson_easy - cp -rf jetson /tmp/jetson_easy - cp -rf modules /tmp/jetson_easy - cp -rf biddibi_boddibi_boo.sh /tmp/jetson_easy - cp -rf LICENSE /tmp/jetson_easy - cp -rf README.md /tmp/jetson_easy + rsync -av --progress . /tmp/jetson_easy/ --exclude .git/ 2>&1 >/dev/null if [ -d $MODULES_CONFIG_PATH ] ; then # Copy folder