Skip to content
This repository has been archived by the owner on Jul 30, 2021. It is now read-only.

Commit

Permalink
Merge pull request #24 from toppers/#23
Browse files Browse the repository at this point in the history
bashrcの編集方法を修正(#23)
  • Loading branch information
esm-tmori authored Sep 20, 2020
2 parents cac5c93 + 883f069 commit 18ccdde
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 18 deletions.
49 changes: 43 additions & 6 deletions Installer/installer/install-single-robot.bash
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
12 changes: 0 additions & 12 deletions Installer/installer/install-v850-gcc.bash
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 18ccdde

Please sign in to comment.