Commit 0b772d8f authored by Joan Vallvé Navarro's avatar Joan Vallvé Navarro
Browse files

ldconfig with sudo

parent 49f3ba45
Pipeline #8658 failed with stages
in 134 minutes and 20 seconds
......@@ -10,6 +10,14 @@ func_make_install () {
fi
}
func_ldconfig () {
if [ "$UID" -eq 0 -o "$EUID" -eq 0 ]; then
ldconfig
else
sudo ldconfig
fi
}
func_echo () {
if [ $VERBOSE == "true" ]; then
echo "$1"
......@@ -140,6 +148,8 @@ while getopts "vap:d:w:hf:c:" opt; do
esac
done
# check sudo permissions
func_ldconfig
# UBUNTU
if [ "$UID" -eq 0 -o "$EUID" -eq 0 ]; then
......@@ -354,7 +364,7 @@ if [ $INSTALL_LASER == "y" ]; then
# LASER_SCAN_UTILS
func_echo "Installing laser_scan_utils (required)..."
cd $DEPS_PATH
ldconfig
func_ldconfig
git clone https://gitlab.iri.upc.edu/labrobotica/algorithms/laser_scan_utils.git
cd laser_scan_utils
mkdir -p build && cd build
......@@ -366,7 +376,7 @@ if [ $INSTALL_LASER == "y" ]; then
# PLUGIN
func_echo "Cloning plugin laser..."
cd $WOLF_PATH
ldconfig
func_ldconfig
git clone -b master https://gitlab.iri.upc.edu/mobile_robotics/wolf_projects/wolf_lib/plugins/laser.git
cd laser
......@@ -379,7 +389,7 @@ if [ $INSTALL_LASER == "y" ]; then
func_make_install
func_echo "Testing plugin laser..."
ldconfig
func_ldconfig
ctest -j$CORES
else
func_echo "Skipping plugin laser."
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment