Skip to content

Commit

Permalink
Move the SIP warning and workaround to end.
Browse files Browse the repository at this point in the history
As discussed in #25.
  • Loading branch information
mikepurvis committed Jan 31, 2016
1 parent c90bbc2 commit feb2e90
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions install
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Software License Agreement (BSD)
#
# Author Mike Purvis <[email protected]>
# Copyright (c) 2014-2015, Clearpath Robotics, Inc., All rights reserved.
# Copyright (c) 2014-2016, Clearpath Robotics, Inc., All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification, are permitted provided that
# the following conditions are met:
Expand Down Expand Up @@ -31,19 +31,6 @@ do_install()
{
set -e

# Check for SIP if on El Capitan
if [[ `sw_vers -productVersion` == *"10.11"* ]]
then
if `csrutil status | grep -q enabled`
then
echo "You have System Integrity Protection enabled."
echo
echo "This prevents DYLD_LIBRARY_PATH from being exported to subshells"
echo "Please add: export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:/opt/ros/$ROS_DISTRO/lib"
echo "To the start of /opt/ros/$ROS_DISTRO/bin/rosrun to fix this issue."
fi
fi

# Homebrew
if ! hash brew 2>/dev/null; then
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Expand Down Expand Up @@ -183,6 +170,19 @@ do_install()
echo
echo " source ${ROS_INSTALL_DIR}/setup.bash"
echo

# Check for SIP if on El Capitan
if [[ `sw_vers -productVersion` == *"10.11"* ]]
then
if `csrutil status | grep -q enabled`
then
echo "You have System Integrity Protection enabled."
echo
echo "This prevents DYLD_LIBRARY_PATH from being exported to subshells"
echo "Please add: export DYLD_LIBRARY_PATH=\$DYLD_LIBRARY_PATH:/opt/ros/\$ROS_DISTRO/lib"
echo "To the start of /opt/ros/$ROS_DISTRO/bin/rosrun to work around the issue."
fi
fi
}

do_install

0 comments on commit feb2e90

Please sign in to comment.