<html><head><meta http-equiv="Content-Type" content="text/html; charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">> On Sat, May 22, 2021 at 1:35 PM Ken Cunningham <<a href="mailto:ken.cunningham.webuse@gmail.com" class="">ken.cunningham.webuse@gmail.com</a>> wrote:<div class="">><br class="">> cd /tmp<br class="">> git clone -b release-2.7 <a href="https://github.com/macports/macports-base.git" class="">https://github.com/macports/macports-base.git</a><br class="">> cd macports-base<br class="">> ./configure && make && sudo make install<br class="">><br class="">> and then add to the $PATH as usual<br class=""><br class="">If you ask me, `curl | sh` is a better option than `sudo make install`. <br class="">Even if we compare them both as anti-patterns. <br class="">Plus, `make` requires a few dependencies. But when you install a package, </div><div class="">all the logic/doctor checks can be implemented on the `ports` binary level. <br class="">Install CLT, Xcode, check the environment, etc. Simple is better.</div><div class=""><div class=""><br class=""></div><div class="">On Sat, May 22, 2021 at 2:31 PM Joshua Root <jmr at <a href="http://macports.org" class="">macports.org</a> wrote:<div class="">></div>> I think the best thing we could do to facilitate one-liner command<br class="Apple-interchange-newline">> line installation is set up a redirect so you can download the latest<br class="Apple-interchange-newline">> binary installer for your OS version without having to construct<br class="Apple-interchange-newline">> its not-so-easy-to-derive name yourself. It would then be simple to<br class="Apple-interchange-newline">> download the .pkg and feed it to installer(8).<br class="Apple-interchange-newline">><br class=""><br class="">Yes, this is the idea. And it seems manageable to implement. </div><div class="">Proper short links, a few lines to produce/validate them in release scripts, profit.</div><div class=""><br class=""></div><div class="">P.S. I have started to build a simple version of such a script[1] based on the advice from the discussion.</div><div class="">Please, join if you desire to improve the script and propose it as a source for the one-liner we are talking about.</div><div class=""><br class=""></div><div class="">Regards,</div><div class="">Artem</div><div class=""><br class=""></div><div class="">[1] <a href="https://gist.github.com/dive/c4a51179aa96d229a32dd3492e5fdc2d" class="">https://gist.github.com/dive/c4a51179aa96d229a32dd3492e5fdc2d</a><br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On 22 May 2021, at 19:55, Jason Liu <<a href="mailto:jasonliu@umich.edu" class="">jasonliu@umich.edu</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div dir="ltr" class=""><div dir="ltr" class=""><div dir="ltr" class=""><div dir="ltr" class=""><br class="">On Sat, May 22, 2021 at 1:35 PM Ken Cunningham <<a href="mailto:ken.cunningham.webuse@gmail.com" target="_blank" class="">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 class="">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 class=""></blockquote><div class=""><br class=""></div><div class="">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 class=""><br class=""></div><div class="">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 class=""><br class=""></div><div class="">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 class=""><br class=""></div><div class=""><div dir="ltr" class="gmail_attr" style="">On Sat, May 22, 2021 at 2:31 PM Joshua Root <<a href="mailto:jmr@macports.org" target="_blank" class="">jmr@macports.org</a>> wrote:<br class=""></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;"><br class="">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 class=""></blockquote></div><div class=""><br class=""></div><div class="">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 class=""><br class=""></div><div class="">3. Install MacPorts for your version of the operating system:</div><div class=""> * <a href="https://github.com/macports/macports-base/releases/download/v2.7.0/MacPorts-2.7.0-11-BigSur.pkg" target="_blank" class="">macOS Big Sur v11</a></div><div class=""> * <a href="https://github.com/macports/macports-base/releases/download/v2.7.0/MacPorts-2.7.0-10.15-Catalina.pkg" target="_blank" class="">macOS Cataline v10.15</a></div><div class=""> * <a href="https://github.com/macports/macports-base/releases/download/v2.7.0/MacPorts-2.7.0-10.14-Mojave.pkg" target="_blank" class="">macOS Mojave v10.14</a></div><div class=""> * <a href="https://www.macports.org/install.php#installing" target="_blank" class="">Older OS? See here.</a></div><br clear="all" class=""><div class=""><div dir="ltr" class=""><div dir="ltr" class=""><div class="">-- </div><div class="">Jason Liu</div></div></div></div><br class=""></div></div></div><br class=""></div></div></div></blockquote></div><br class=""></div></div></body></html>