<p>Friendly Automation <strong>submitted</strong> this change.</p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/20052">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span></span><br></pre><div style="white-space:pre-wrap">Approvals:
George Joseph: Looks good to me, approved
Friendly Automation: Approved for Submit
</div><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: I9c140c7f12ca7dafe65c317f2a26122cf2c72556<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;"><span>diff --git a/contrib/scripts/install_prereq b/contrib/scripts/install_prereq</span><br><span>index 98e9350..16a094e 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>@@ -411,7 +448,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/+/20052">change 20052</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/+/20052"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 18 </div>
<div style="display:none"> Gerrit-Change-Id: I9c140c7f12ca7dafe65c317f2a26122cf2c72556 </div>
<div style="display:none"> Gerrit-Change-Number: 20052 </div>
<div style="display:none"> Gerrit-PatchSet: 2 </div>
<div style="display:none"> Gerrit-Owner: Martin McCarthy <martin.c.mccarthy@outlook.com> </div>
<div style="display:none"> Gerrit-Reviewer: Friendly Automation </div>
<div style="display:none"> Gerrit-Reviewer: George Joseph <gjoseph@digium.com> </div>
<div style="display:none"> Gerrit-MessageType: merged </div>