From 0725da0e221c1a75281044c32dd9a5abd19abfb1 Mon Sep 17 00:00:00 2001
From: Lionel Gauthier <lionel.gauthier@eurecom.fr>
Date: Mon, 27 Jan 2014 13:49:31 +0000
Subject: [PATCH] Install lib

git-svn-id: http://svn.eurecom.fr/openair4G/trunk@4956 818b1a75-f10b-46b9-bf7c-635c3b92a50f
---
 openair-cn/SCRIPTS/utils.bash | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/openair-cn/SCRIPTS/utils.bash b/openair-cn/SCRIPTS/utils.bash
index 97222be1f1..3534ebe52d 100755
--- a/openair-cn/SCRIPTS/utils.bash
+++ b/openair-cn/SCRIPTS/utils.bash
@@ -213,6 +213,20 @@ assert() {
     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() {
   # 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
-- 
GitLab