<div dir="ltr"><div class="gmail_default" style="font-family:monospace,monospace">Klaatu --<br><br></div><div class="gmail_default" style="font-family:monospace,monospace">That's pretty much what I do ( source $PROGRAM.info ) in my do-SlackBuild.$PRGNAM scripts.<br><br></div><div class="gmail_default" style="font-family:monospace,monospace">But I do that in a wrapper-script that invokes the standard SlackBuild.<br><br></div><div class="gmail_default" style="font-family:monospace,monospace">The Code below is auto-generated by a get-SB-pkg script ( example:  get-SB-pkg intel-microcode )<br><br></div><div class="gmail_default" style="font-family:monospace,monospace">As you can see, the $PRGNAM.info File is sourced by the wrapper script but <span class="gmail_default" style="font-family:monospace,monospace"></span>I can still override the VERSION as expected:  <br></div><div class="gmail_default" style="font-family:monospace,monospace"><br>   VERSION=1.2.3.4 ./do-SlackBuild.intel-microcode <br></div><div class="gmail_default" style="font-family:monospace,monospace"><br></div><div class="gmail_default" style="font-family:monospace,monospace">One can also set TAG= to append a TAG ( like say, TAG=_kjh )<br><br></div><div class="gmail_default" style="font-family:monospace,monospace">As a bonus, the do-wrapper logs all the output to $PRGNAM-SlackBuild-$VERSION$TAG.log<br><br></div><div class="gmail_default" style="font-family:monospace,monospace">Anyhow ... my $0.02 ... no need to change the SlackBuilds ( PLEASE don't change the SlackBuilds :)<br></div><div class="gmail_default" style="font-family:monospace,monospace"><br>-- kjh<br><br></div><div class="gmail_default" style="font-family:monospace,monospace"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">#!/bin/sh<br><br>DoName="intel-microcode.SlackBuild"<br><br>MyVersion="$VERSION"<br><br>. ./<a href="http://intel-microcode.info">intel-microcode.info</a><br><br>[ "$MyVersion" = "" ] && MyVersion="$VERSION"<br><br>LogNam="$DoName-$MyVersion$TAG.log"<br><br>unset PRGNAM<br>unset VERSION<br>unset HOMEPAGE<br>unset DOWNLOAD<br>unset MD5SUM<br>unset DOWNLOAD_x86_64<br>unset MD5SUM_x86_64<br>unset REQUIRES<br>unset MAINTAINER<br>unset EMAIL<br>#<br># set and export any extra variables here<br>#<br>export TAG<br>export VERSION="$MyVersion"<br></blockquote><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"># do the deed<br>#<br>echo "$DoName startup  at `date`"  |tee    $LogNam<br>./$DoName 2>&1                     |tee -a $LogNam<br>#<br>RetCode=${PIPESTATUS[0]}<br>#<br>[ "$RetCode" = "0" ] && RetStr="complete" || RetStr="FAILED  "<br>#<br># optional pre-installation instructions  here<br>#<br>#<br># optional pre-installation instructions there<br>#<br># log your results<br>#<br>echo "$DoName $RetStr at `date` ... RetCode = $RetCode" |tee -a $LogNam<br>exit $RetCode<br></blockquote><div> </div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Jan 4, 2022 at 3:11 PM Klaatu <<a href="mailto:klaatu@mixedsignals.ml">klaatu@mixedsignals.ml</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><u></u>
<div style="font-family:"Noto Sans";font-size:10pt;font-weight:400;font-style:normal">
<p style="margin:0px;text-indent:0px">Why do we define the VERSION for a package in two separate files?</p>
<p style="margin:0px;text-indent:0px"> </p>
<p style="margin:0px;text-indent:0px">What if we replaced this line in foo.SlackBuild:</p>
<p style="margin:0px;text-indent:0px">VERSION={VERSION:-0.0.1}</p>
<p style="margin:0px;text-indent:0px"> </p>
<p style="margin:0px;text-indent:0px">with this instead:</p>
<p style="margin:0px;text-indent:0px">. ./$PRGNAM.info</p>
<p style="margin:0px;text-indent:0px"> </p>
<p style="margin:0px;text-indent:0px">The VERSION variable would get imported from a consolidated location (the .info file).</p>
<p style="margin:0px;text-indent:0px"> </p>
<p style="margin:0px;text-indent:0px">It seems to make more sense to me, and it makes trivial upgrades (the ones where I go in and just bump a version number to something I want to build) a one-file task.</p>
<p style="margin:0px;text-indent:0px"> </p>
<p style="margin:0px;text-indent:0px">Thoughts?</p></div>_______________________________________________<br>
SlackBuilds-users mailing list<br>
<a href="mailto:SlackBuilds-users@slackbuilds.org" target="_blank">SlackBuilds-users@slackbuilds.org</a><br>
<a href="https://lists.slackbuilds.org/mailman/listinfo/slackbuilds-users" rel="noreferrer" target="_blank">https://lists.slackbuilds.org/mailman/listinfo/slackbuilds-users</a><br>
Archives - <a href="https://lists.slackbuilds.org/pipermail/slackbuilds-users/" rel="noreferrer" target="_blank">https://lists.slackbuilds.org/pipermail/slackbuilds-users/</a><br>
FAQ - <a href="https://slackbuilds.org/faq/" rel="noreferrer" target="_blank">https://slackbuilds.org/faq/</a><br>
<br>
</blockquote></div>