Commit 0725da0e authored by Lionel Gauthier's avatar Lionel Gauthier

Install lib

git-svn-id: http://svn.eurecom.fr/openair4G/trunk@4956 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent 0a7f0fbb
...@@ -213,6 +213,20 @@ assert() { ...@@ -213,6 +213,20 @@ assert() {
fi fi
} }
test_command_install_lib() {
# usage: test_command_install_package searched_binary package_to_be_installed_if_binary_not_found optional_option_to_apt_get_install
if [ ! -f $1 ]; then
echo_warning "$2 seems to be not installed, trying..."
apt-get install $2 -y
if [ ! -f $1 ]; then
echo_error "$1 unavailable"
exit 1
fi
fi
echo_success "$1 available"
}
test_command_install_package() { test_command_install_package() {
# usage: test_command_install_package searched_binary package_to_be_installed_if_binary_not_found optional_option_to_apt_get_install # usage: test_command_install_package searched_binary package_to_be_installed_if_binary_not_found optional_option_to_apt_get_install
if [ $# -eq 2 ]; then if [ $# -eq 2 ]; then
......
Markdown is supported
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