mirror of
				https://github.com/asterisk/asterisk.git
				synced 2025-10-26 22:30:28 +00:00 
			
		
		
		
	Merge "install_prereq: Check if is installed aptitude otherwise to install."
This commit is contained in:
		| @@ -70,9 +70,10 @@ check_installed_debs() { | |||||||
| 	do | 	do | ||||||
| 		tocheck="${tocheck} ^${pack}$" | 		tocheck="${tocheck} ^${pack}$" | ||||||
| 	done | 	done | ||||||
| 	aptitude -F '%c %p' search ${tocheck} 2>/dev/null \ | 	pkgs=$(aptitude -F '%c %p' search ${tocheck} 2>/dev/null | awk '/^p/{print $2}') | ||||||
| 		| awk '/^p/{print $2}' \ | 	if ! [ ${#pkgs} -eq 0 ]; then | ||||||
| 		| grep -v ':i386$' | 		echo $pkgs | grep -v ':i386$' | ||||||
|  | 	fi | ||||||
| } | } | ||||||
|  |  | ||||||
| # parsing the output of yum is close to impossible. | # parsing the output of yum is close to impossible. | ||||||
| @@ -96,6 +97,9 @@ check_installed_pkgs() { | |||||||
| } | } | ||||||
|  |  | ||||||
| handle_debian() { | handle_debian() { | ||||||
|  | 	if ! [ -x "$(command -v aptitude)" ]; then | ||||||
|  | 		apt-get install aptitude | ||||||
|  | 	fi | ||||||
| 	extra_packs=`check_installed_debs $PACKAGES_DEBIAN` | 	extra_packs=`check_installed_debs $PACKAGES_DEBIAN` | ||||||
| 	$testcmd aptitude install -y $extra_packs | 	$testcmd aptitude install -y $extra_packs | ||||||
| } | } | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user