diff --git a/Installer/installer/install-single-robot.bash b/Installer/installer/install-single-robot.bash index 28682b9..80535ce 100644 --- a/Installer/installer/install-single-robot.bash +++ b/Installer/installer/install-single-robot.bash @@ -12,13 +12,8 @@ then bash ${TOOL_DIR}/athrill_install.bash bash ${TOOL_DIR}/athrill_build.bash grep "athrill/bin/linux/" ${HOME}/.bashrc > /dev/null - if [ $? -ne 0 ] + if [ $? -eq 0 ] then - echo "export PATH=`pwd`/athrill/bin/linux/:\${PATH}" >> ${HOME}/.bashrc - echo "Updated: ${HOME}/.bashrc" - echo "Please do following command:" - echo "source ${HOME}/.bashrc" - else echo "INFO: .bashrc already has athrill path:" grep "athrill/bin/linux/" ${HOME}/.bashrc fi @@ -31,3 +26,45 @@ fi bash ${TOOL_DIR}/ev3rt_install.bash bash ${TOOL_DIR}/sample_install.bash bash ${INS_DIR}/install-v850-gcc.bash + + +ATHRILL_GCC_PATH=${ROOT_DIR}/tools +echo "" + +grep "athrill/bin/linux/" ${HOME}/.bashrc > /dev/null +if [ $? -ne 0 ] + then + grep "athrill-gcc-package" ${HOME}/.bashrc > /dev/null + if [ $? -ne 0 ] + then + echo "INFO: Please do following 2 commands to setup athrill & athrill-gcc paths" + echo "echo \"export PATH=\`pwd\`/athrill/bin/linux/:${ATHRILL_GCC_PATH}/athrill-gcc-package/usr/local/athrill-gcc/bin/:\${PATH}\" >> \${HOME}/.bashrc" + echo "source ${HOME}/.bashrc" + + else + echo "INFO: .bashrc already has athrill-gcc path:" + grep "athrill-gcc-package" ${HOME}/.bashrc + echo "" + echo "INFO: Please do following 2 commands to setup athrill path" + echo "echo \"export PATH=\`pwd\`/athrill/bin/linux/:\${PATH}\" >> \${HOME}/.bashrc" + echo "source ${HOME}/.bashrc" + fi + + else + grep "athrill-gcc-package" ${HOME}/.bashrc > /dev/null + if [ $? -ne 0 ] + then + echo "INFO: .bashrc already has athrill path:" + grep "athrill/bin/linux/" ${HOME}/.bashrc + echo "" + echo "INFO: Please do following 2 commands to setup athrill-gcc path" + echo "echo \"export PATH=${ATHRILL_GCC_PATH}/athrill-gcc-package/usr/local/athrill-gcc/bin/:\${PATH}\" >> ${HOME}/.bashrc" + echo "source ${HOME}/.bashrc" + + else + echo "INFO: .bashrc already has athrill & athrill-gcc paths:" + grep "athrill/bin/linux/" ${HOME}/.bashrc + grep "athrill-gcc-package" ${HOME}/.bashrc + fi + +fi diff --git a/Installer/installer/install-v850-gcc.bash b/Installer/installer/install-v850-gcc.bash index 29b0685..e256a27 100644 --- a/Installer/installer/install-v850-gcc.bash +++ b/Installer/installer/install-v850-gcc.bash @@ -51,15 +51,3 @@ else exit 1 fi fi - -grep "athrill-gcc-package" ${HOME}/.bashrc > /dev/null -if [ $? -ne 0 ] -then - echo "export PATH=${ATHRILL_GCC_PATH}/athrill-gcc-package/usr/local/athrill-gcc/bin/:\${PATH}" >> ${HOME}/.bashrc - echo "Updated: ${HOME}/.bashrc" - echo "Please do following command:" - echo "source ${HOME}/.bashrc" -else - echo "INFO: .bashrc already has athrill-gcc path:" - grep "athrill-gcc-package" ${HOME}/.bashrc -fi