<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><br>On Sat, May 22, 2021 at 1:35 PM Ken Cunningham <<a href="mailto:ken.cunningham.webuse@gmail.com" target="_blank">ken.cunningham.webuse@gmail.com</a>> wrote:<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">Yes, thanks for the tips! I am pretty sure that it is possible to automate it one way or another. But my point is that it would be helpful to have a one-liner to install MacPorts and maintain it as a part of the main repository. </blockquote><br>This was of course suggested years ago as well, when homebrew first did it, but at that time was that it was both not needed and not a useful addition to MacPorts, if I recall the full email exchange correctly, so we let the idea die.<br></blockquote><div><br></div><div>I feel like having a one-liner to install MacPorts, similar to Homebrew, would be incredibly useful, especially for people who are not tech savvy. It seems that many of us on the mailing list, including myself, already have our own home-grown scripts to automate installing MacPorts. One thing that I particularly like about the Homebrew installer is that it automatically installs the CLT... I've been doing something similar in my own MacPorts install script for around a decade.</div><div><br></div><div>My script even automatically accepts the Xcode license by using a small chunk of expect. I realize that from the perspective of the MacPorts developers, we might not want to be taking over control of this step from the user. But from personal experience as a sysadmin, even this seemingly minor step can be a fairly high hurdle for people who are not tech savvy.</div><div><br></div><div>Another thing that my script tries to automate is to add /opt/local to everyone's $PATH if the script detects that SIP is disabled.</div><div><br></div><div><div dir="ltr" class="gmail_attr" style="color:rgb(0,0,0)">On Sat, May 22, 2021 at 2:31 PM Joshua Root <<a href="mailto:jmr@macports.org" target="_blank">jmr@macports.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="color:rgb(0,0,0);margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><br>I think the best thing we could do to facilitate one-liner command line installation is set up a redirect so you can download the latest binary installer for your OS version without having to construct its not-so-easy-to-derive name yourself. It would then be simple to download the .pkg and feed it to installer(8).<br></blockquote></div><div><br></div><div>This would be incredibly useful, and would allow me to cut out around 40-50 lines of code from my MacPorts install script (which is currently constructing the not-so-easy-to-derive name myself). A single permalink redirect would also allow the installation instructions to be simplified on the MacPorts website, instead of what's currently there:</div><div><br></div><div>3. Install MacPorts for your version of the operating system:</div><div>    * <a href="https://github.com/macports/macports-base/releases/download/v2.7.0/MacPorts-2.7.0-11-BigSur.pkg" target="_blank">macOS Big Sur v11</a></div><div>    * <a href="https://github.com/macports/macports-base/releases/download/v2.7.0/MacPorts-2.7.0-10.15-Catalina.pkg" target="_blank">macOS Cataline v10.15</a></div><div>    * <a href="https://github.com/macports/macports-base/releases/download/v2.7.0/MacPorts-2.7.0-10.14-Mojave.pkg" target="_blank">macOS Mojave v10.14</a></div><div>    * <a href="https://www.macports.org/install.php#installing" target="_blank">Older OS? See here.</a></div><br clear="all"><div><div dir="ltr"><div dir="ltr"><div>-- </div><div>Jason Liu</div></div></div></div><br></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, May 22, 2021 at 1:35 PM Ken Cunningham <<a href="mailto:ken.cunningham.webuse@gmail.com" target="_blank">ken.cunningham.webuse@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">> Yes, thanks for the tips! I am pretty sure that it is possible to automate it one way or another. But my point is that it would be helpful to have a one-liner to install MacPorts and maintain it as a part of the main repository. <br>
<br>
This was of course suggested years ago as well, when homebrew first did it, but at that time was that it was both not needed and not a useful addition to MacPorts, if I recall the full email exchange correctly, so we let the idea die.<br>
<br>
I wrote up a MacPorts install script for Jeremy’s Xquartz project here <<a href="https://github.com/XQuartz/XQuartz/blob/master/install-or-update-macports.sh" rel="noreferrer" target="_blank">https://github.com/XQuartz/XQuartz/blob/master/install-or-update-macports.sh</a>> that adds a bit more trickery he needed, but the basic guts was extremely simple and what I recommend to people who complain that MacPorts is extremely difficult to get installed and they claim to have spent hours and hours and hours trying to make it work:<br>
<br>
==<br>
<br>
cd /tmp<br>
git clone -b release-2.7 <a href="https://github.com/macports/macports-base.git" rel="noreferrer" target="_blank">https://github.com/macports/macports-base.git</a><br>
cd macports-base<br>
./configure && make && sudo make install<br>
<br>
<br>
and then add to the $PATH as usual<br>
<br>
==</blockquote></div>
</div></div>