From c60c658c92937e207323732edeac34caf5b10698 Mon Sep 17 00:00:00 2001 From: Raffaello Bonghi Date: Sat, 1 Dec 2018 12:12:02 +0100 Subject: [PATCH] Minor fixes --- modules/1-install_jetson/1-install_jetson.sh | 11 +++++++++++ modules/7-set_git/7-set_git.sh | 14 ++++---------- modules/9-deeplearning/9-deeplearning.sh | 3 +-- 3 files changed, 16 insertions(+), 12 deletions(-) diff --git a/modules/1-install_jetson/1-install_jetson.sh b/modules/1-install_jetson/1-install_jetson.sh index 8c440bb..da709b2 100755 --- a/modules/1-install_jetson/1-install_jetson.sh +++ b/modules/1-install_jetson/1-install_jetson.sh @@ -53,6 +53,17 @@ script_check() return 1 } +script_info() +{ + script_check + + if [ $? -eq 1 ] ; then + local info_je=$(jetson_release) + local je_version=$(echo $info_je | grep -Po '(?<=Jetson Easy v)[^;]+' ) + echo " - Update jetson_easy from $je_version to $JETSON_EASY_VERSION" + fi +} + script_run() { tput setaf 6 diff --git a/modules/7-set_git/7-set_git.sh b/modules/7-set_git/7-set_git.sh index 783e816..461f62d 100644 --- a/modules/7-set_git/7-set_git.sh +++ b/modules/7-set_git/7-set_git.sh @@ -110,12 +110,12 @@ script_load_default() script_save() { - if [ ! -z ${NEW_GIT_USERNAME+x} ] ; then + if [ ! -z ${NEW_GIT_USERNAME+x} ] && [ ! -z $NEW_GIT_USERNAME ] ; then # if [ NEW_GIT_USERNAME != $(git config user.name) ] ; then echo "NEW_GIT_USERNAME=\"$NEW_GIT_USERNAME\"" >> $1 # fi fi - if [ ! -z ${NEW_GIT_EMAIL+x} ] ; then + if [ ! -z ${NEW_GIT_EMAIL+x} ] && [ ! -z $NEW_GIT_EMAIL ] ; then echo "NEW_GIT_EMAIL=\"$NEW_GIT_EMAIL\"" >> $1 fi } @@ -136,12 +136,9 @@ script_info() set_user_name() { - # Load default user - script_load_user - local NEW_GIT_USERNAME_TMP_VALUE NEW_GIT_USERNAME_TMP_VALUE=$(whiptail --inputbox "$MODULE_NAME - Set user name" 8 78 $NEW_GIT_USERNAME --title "Set user.name" 3>&1 1>&2 2>&3) - exitstatus=$? + local exitstatus=$? if [ $exitstatus = 0 ] ; then # Write the new workspace NEW_GIT_USERNAME=$NEW_GIT_USERNAME_TMP_VALUE @@ -150,12 +147,9 @@ set_user_name() set_email() { - # Load default email - script_load_email - local NEW_GIT_EMAIL_TMP_VALUE NEW_GIT_EMAIL_TMP_VALUE=$(whiptail --inputbox "$MODULE_NAME - Set user email" 8 78 $NEW_GIT_EMAIL --title "Set user.email" 3>&1 1>&2 2>&3) - exitstatus=$? + local exitstatus=$? if [ $exitstatus = 0 ]; then # Write the new workspace NEW_GIT_EMAIL=$NEW_GIT_EMAIL_TMP_VALUE diff --git a/modules/9-deeplearning/9-deeplearning.sh b/modules/9-deeplearning/9-deeplearning.sh index 913caaa..2dc619a 100755 --- a/modules/9-deeplearning/9-deeplearning.sh +++ b/modules/9-deeplearning/9-deeplearning.sh @@ -292,8 +292,7 @@ script_save() fi if [ ! -z ${DP_FOLDER+x} ] ; then - if [ $DP_FOLDER != "\"\"" ] - then + if [ $DP_FOLDER != "\"\"" ] ; then echo "DP_FOLDER=\"$DP_FOLDER\"" >> $1 fi fi