Reduce number of packages install_prereq installs on Debian systems.
[asterisk/asterisk.git] / contrib / scripts / install_prereq
index 1359f9b..8fc66cc 100755 (executable)
@@ -50,8 +50,12 @@ in_test_mode() {
 }
 
 check_installed_debs() {
-       aptitude -F '%c %p' search "$@" 2>/dev/null \
-       | awk '/^p/{print $2}'
+       for pack in "$@"
+       do
+               tocheck="${tocheck} ^${pack}$"
+       done
+       aptitude -F '%c %p' search ${tocheck} 2>/dev/null \
+       | awk '/^p/{print $2}'
 }
 
 # parsing the output of yum is close to impossible.