From 0462d9b129ba6eea089226e97019d6fa6aa84584 Mon Sep 17 00:00:00 2001
From: fherrero <fherrero@iri.upc.edu>
Date: Thu, 18 Jan 2018 18:20:26 +0100
Subject: [PATCH] Removed unnecessary output when dependencies not found.
 Changed suggested buffer size from 100 to 1.

---
 add_topic_publisher_subscriber.sh |  4 ++--
 libraries/scripts_library.sh      | 20 ++++----------------
 2 files changed, 6 insertions(+), 18 deletions(-)

diff --git a/add_topic_publisher_subscriber.sh b/add_topic_publisher_subscriber.sh
index 8630e11..e89e5fd 100755
--- a/add_topic_publisher_subscriber.sh
+++ b/add_topic_publisher_subscriber.sh
@@ -51,7 +51,7 @@ do
        ;;
     ?)
        echo "invalid input argument ${OPTION}"
-       kill_exit "Usage: add_topic_publisher_subscriber.sh -o [publisher,subscriber] -p ros_pkg -t topic_name -m message.msg -b 100"
+       kill_exit "Usage: add_topic_publisher_subscriber.sh -o [publisher,subscriber] -p ros_pkg -t topic_name -m message.msg -b 1"
        exit
        ;;
   esac
@@ -61,7 +61,7 @@ done
 if [ ! "${pub_subs}" ] || [ ! "${ros_pkg}" ] || [ ! "${topic_name}" ] || [ ! "${msg_file}" ] || [ ! "${buffer}" ]
 then
   echo "Missing input parameters..."
-  kill_exit "Usage: add_topic_publisher_subscriber.sh -o [publisher,subscriber] -p ros_pkg -t topic_name -m message.msg -b 100"
+  kill_exit "Usage: add_topic_publisher_subscriber.sh -o [publisher,subscriber] -p ros_pkg -t topic_name -m message.msg -b 1"
 fi
 
 #check publisher subscriber parameter
diff --git a/libraries/scripts_library.sh b/libraries/scripts_library.sh
index d5e1c0b..d0c8705 100644
--- a/libraries/scripts_library.sh
+++ b/libraries/scripts_library.sh
@@ -474,41 +474,29 @@ function check_package_file_integrity
 
   comment="<build_depend>iri_base_${type}</build_depend>"
   text_found_in_file "${comment}" "package.xml"
-  if [[ "${text_found}" = "false"  ]]
+  if [[ "${text_found}" = "true"  ]]
   then
-    echo "${comment} not found in package.xml file"
-  else
-    #echo "${comment} found in package.xml file"
     build_depend=true
   fi
   
   comment="<depend>iri_base_${type}</depend>"
   text_found_in_file "${comment}" "package.xml"
-  if [[ "${text_found}" = "false"  ]]
+  if [[ "${text_found}" = "true"  ]]
   then
-    echo "${comment} not found in package.xml file"
-  else
-    #echo "${comment} found in package.xml file"
     depend=true
   fi
 
   comment="<exec_depend>iri_base_${type}</exec_depend>"
   text_found_in_file "${comment}" "package.xml"
-  if [[ "${text_found}" = "false"  ]]
+  if [[ "${text_found}" = "true"  ]]
   then
-    echo "${comment} not found in package.xml file"
-  else
-    #echo "${comment} found in package.xml file"
     exec_depend="true"
   fi
   
   comment="<run_depend>iri_base_${type}</run_depend>"
   text_found_in_file "${comment}" "package.xml"
-  if [[ "${text_found}" = "false"  ]]
+  if [[ "${text_found}" = "true"  ]]
   then
-    echo "${comment} not found in package.xml file"
-  else
-    #echo "${comment} found in package.xml file"
     run_depend="true"
   fi
   
-- 
GitLab