Skip to content

Commit

Permalink
Fix: Work around .bashrc not executing from a script.
Browse files Browse the repository at this point in the history
  • Loading branch information
Bryan A. Jones authored and Bryan A. Jones committed Aug 21, 2015
1 parent 26a2d12 commit b89dc8b
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion scripts/drone_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,21 @@ sudo apt-get install -y ros-indigo-desktop-full
sudo rosdep init
rosdep update
echo "source /opt/ros/indigo/setup.bash" >> ~/.bashrc
source ~/.bashrc
# In the `ROS installation instructions`_, this was ``source ~/.bashrc``. However, that doesn't work when run from a script, as the output from running this script shows::
#
# source ~/.bashrc
# # ~/.bashrc: executed by bash(1) for non-login shells.
# # see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# # for examples
#
# # If not running interactively, don't do anything
# case $- in
# *i*) ;;
# *) return;;
# esac
#
# So, the default behavior of ``~/.bashrc`` is to not run from a script! Hence the change above.
source /opt/ros/indigo/setup.bash
sudo apt-get install -y python-rosinstall
#
# Set up the ROS environment
Expand Down

0 comments on commit b89dc8b

Please sign in to comment.