<p>Martin McCarthy has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/19977">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">install_prereq: Add Linux Mint support.<br><br>ASTERISK-30359 #close<br><br>Change-Id: Ie877a405457149991a24e3f519503ccca3da4008<br>---<br>M contrib/scripts/install_prereq<br>1 file changed, 53 insertions(+), 1 deletion(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/77/19977/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/contrib/scripts/install_prereq b/contrib/scripts/install_prereq</span><br><span>index 5843853..0aea77e 100755</span><br><span>--- a/contrib/scripts/install_prereq</span><br><span>+++ b/contrib/scripts/install_prereq</span><br><span>@@ -270,6 +270,43 @@</span><br><span> fi</span><br><span> }</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+handle_linuxmint() {</span><br><span style="color: hsl(120, 100%, 40%);">+ # Store temporary variable to contain list of missing packages</span><br><span style="color: hsl(120, 100%, 40%);">+ missing_packages=""</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ # Check installed packages for Mint</span><br><span style="color: hsl(120, 100%, 40%);">+ for package in $PACKAGES_DEBIAN; do</span><br><span style="color: hsl(120, 100%, 40%);">+ if [ "$package" = "libgmime-2.6-dev" ] || [ "$package" = "libsrtp0-dev" ]; then</span><br><span style="color: hsl(120, 100%, 40%);">+ continue</span><br><span style="color: hsl(120, 100%, 40%);">+ fi</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ missing_package_check=$(apt list --installed 2>/dev/null | grep -c $package)</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ if [ "$missing_package_check" -eq 0 ]; then</span><br><span style="color: hsl(120, 100%, 40%);">+ echo "This package is missing: "$package</span><br><span style="color: hsl(120, 100%, 40%);">+ missing_packages="${missing_packages} $package"</span><br><span style="color: hsl(120, 100%, 40%);">+ else</span><br><span style="color: hsl(120, 100%, 40%);">+ echo "Package "$package" is present."</span><br><span style="color: hsl(120, 100%, 40%);">+ fi</span><br><span style="color: hsl(120, 100%, 40%);">+ done</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ # Update the packages on our local system</span><br><span style="color: hsl(120, 100%, 40%);">+ echo "==========================="</span><br><span style="color: hsl(120, 100%, 40%);">+ echo "Updating your system's packages"</span><br><span style="color: hsl(120, 100%, 40%);">+ echo "==========================="</span><br><span style="color: hsl(120, 100%, 40%);">+ $testcmd apt update</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ # Inform user of packages to be installed</span><br><span style="color: hsl(120, 100%, 40%);">+ echo "==========================="</span><br><span style="color: hsl(120, 100%, 40%);">+ echo "The following packages will be installed on your system;"</span><br><span style="color: hsl(120, 100%, 40%);">+ echo $missing_packages</span><br><span style="color: hsl(120, 100%, 40%);">+ echo "==========================="</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ if [ "$missing_packages" != "" ] ; then</span><br><span style="color: hsl(120, 100%, 40%);">+ $testcmd apt -m install -y $missing_packages</span><br><span style="color: hsl(120, 100%, 40%);">+ fi</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> handle_rh() {</span><br><span> extra_packs=`check_installed_rpms $PACKAGES_RH`</span><br><span> if [ x"$extra_packs" != "x" ] ; then</span><br><span>@@ -405,7 +442,11 @@</span><br><span> </span><br><span> # The distributions we do support:</span><br><span> if [ -r /etc/debian_version ]; then</span><br><span style="color: hsl(0, 100%, 40%);">- handle_debian</span><br><span style="color: hsl(120, 100%, 40%);">+ if [ -f /etc/linuxmint/info ]; then</span><br><span style="color: hsl(120, 100%, 40%);">+ handle_linuxmint</span><br><span style="color: hsl(120, 100%, 40%);">+ else</span><br><span style="color: hsl(120, 100%, 40%);">+ handle_debian</span><br><span style="color: hsl(120, 100%, 40%);">+ fi</span><br><span> elif [ -r /etc/redhat-release ]; then</span><br><span> handle_rh</span><br><span> elif [ -f /etc/SuSE-release -o -f /etc/novell-release ]; then</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/19977">change 19977</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.asterisk.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.asterisk.org/c/asterisk/+/19977"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: Ie877a405457149991a24e3f519503ccca3da4008 </div>
<div style="display:none"> Gerrit-Change-Number: 19977 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Martin McCarthy <martin.c.mccarthy@outlook.com> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>