Skip to content

Commit 7f74326

Browse files
authored
Merge pull request #1159 from n-kawauchi/update_install_scripts
一括インストールスクリプトでのrtshellエラーメッセージ表示改善
2 parents b0d14f7 + 334bd02 commit 7f74326

File tree

2 files changed

+30
-14
lines changed

2 files changed

+30
-14
lines changed

scripts/openrtm2_install_raspbian.sh

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# Nobu Kawauchi
77
#
88

9-
VERSION=2.0.2.02
9+
VERSION=2.0.2.03
1010
FILENAME=openrtm2_install_raspbian.sh
1111
BIT=`getconf LONG_BIT`
1212

@@ -110,6 +110,7 @@ arg_python=false
110110
arg_java=false
111111
arg_rtshell=false
112112
err_message=""
113+
rts_msg=""
113114
select_opt_c=""
114115
}
115116

@@ -584,12 +585,10 @@ install_proc()
584585
if test "x$rtshell_ret" != "x"; then
585586
sudo rtshell_post_install -n
586587
else
587-
msg="\n[ERROR] Failed to install rtshell-aist."
588-
msg2="\nPlease add the following two lines to /etc/pip.conf and run the script again."
589-
msg3="\n[global]"
590-
msg4="\nbreak-system-packages = true"
591-
tmp="$err_message$msg$msg2$msg3$msg4"
592-
err_message=$tmp
588+
rts_msg="[ERROR] Failed to install rtshell-aist."
589+
rts_msg2="Please add the following two lines to /etc/pip.conf and run the script again."
590+
rts_msg3="[global]"
591+
rts_msg4="break-system-packages = true"
593592
fi
594593
fi
595594
}
@@ -811,6 +810,15 @@ if test ! "x$err_message" = "x" ; then
811810
echo "${ESC}[33m${err_message}${ESC}[m"
812811
fi
813812

813+
if test ! "x$rts_msg" = "x" ; then
814+
ESC=$(printf '\033')
815+
echo $LF
816+
echo "${ESC}[33m${rts_msg}${ESC}[m"
817+
echo "${ESC}[33m${rts_msg2}${ESC}[m"
818+
echo "${ESC}[33m${rts_msg3}${ESC}[m"
819+
echo "${ESC}[33m${rts_msg4}${ESC}[m"
820+
fi
821+
814822
#ESC=$(printf '\033')
815823
#if test "x$OPT_FLG" = "xtrue" &&
816824
# test "x$arg_cxx" = "xtrue" &&

scripts/openrtm2_install_ubuntu.sh

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
# = OPT_UNINST : uninstallation
1515
#
1616

17-
VERSION=2.0.2.03
17+
VERSION=2.0.2.04
1818
FILENAME=openrtm2_install_ubuntu.sh
1919

2020
#
@@ -138,6 +138,7 @@ arg_java=false
138138
arg_openrtp=false
139139
arg_rtshell=false
140140
err_message=""
141+
rts_msg=""
141142
select_opt_c=""
142143
}
143144

@@ -679,12 +680,10 @@ install_proc()
679680
if test "x$rtshell_ret" != "x"; then
680681
sudo rtshell_post_install -n
681682
else
682-
msg="\n[ERROR] Failed to install rtshell-aist."
683-
msg2="\nPlease add the following text to /etc/pip.conf and run the script again."
684-
msg3="\n[global]"
685-
msg4="\nbreak-system-packages = true"
686-
tmp="$err_message$msg$msg2$msg3$msg4"
687-
err_message=$tmp
683+
rts_msg="[ERROR] Failed to install rtshell-aist."
684+
rts_msg2="Please add the following text to /etc/pip.conf and run the script again."
685+
rts_msg3="[global]"
686+
rts_msg4="break-system-packages = true"
688687
fi
689688
fi
690689
}
@@ -934,6 +933,15 @@ if test ! "x$err_message" = "x" ; then
934933
echo "${ESC}[33m${err_message}${ESC}[m"
935934
fi
936935

936+
if test ! "x$rts_msg" = "x" ; then
937+
ESC=$(printf '\033')
938+
echo $LF
939+
echo "${ESC}[33m${rts_msg}${ESC}[m"
940+
echo "${ESC}[33m${rts_msg2}${ESC}[m"
941+
echo "${ESC}[33m${rts_msg3}${ESC}[m"
942+
echo "${ESC}[33m${rts_msg4}${ESC}[m"
943+
fi
944+
937945
ESC=$(printf '\033')
938946
if test "x$OPT_UNINST" = "xtrue" &&
939947
test "x$arg_cxx" = "xtrue" &&

0 commit comments

Comments
 (0)