URL
https://opencores.org/ocsvn/radiohdl/radiohdl/trunk
Subversion Repositories radiohdl
[/] [radiohdl/] [trunk/] [set_config_path] - Rev 4
Compare with Previous | Blame | View Log
#!/bin/bash
###############################################################################
#
# Copyright (C) 2018
# ASTRON (Netherlands Institute for Radio Astronomy) <http://www.astron.nl/>
# P.O.Box 2, 7990 AA Dwingeloo, The Netherlands
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# $Id:$
#
###############################################################################
#
# Script for adopting RadioHDL configuration parameters as envrionment variables.
# See config_variable.py for syntax.
#
if [ "${1:-}" == "--verbose" ]; then
verbose=$1
shift
else
verbose=""
fi
_EXTRA_PATHS=`${RADIOHDL_GEAR}/core/config_variable.py $@`
if [ $? != 0 ]; then
echo "Error occured during adoption of configuration settings."
unset _EXTRA_PATHS
exit 1
fi
if [ -n "$verbose" ]; then
echo "Extending PATH with: "$_EXTRA_PATHS
fi
pathadd "PATH" $_EXTRA_PATHS
unset _EXTRA_PATHS