> On Sat, May 22, 2021 at 1:35 PM Ken Cunningham > <[email protected]> wrote: > > cd /tmp > git clone -b release-2.7 https://github.com/macports/macports-base.git > cd macports-base > ./configure && make && sudo make install > > and then add to the $PATH as usual
If you ask me, `curl | sh` is a better option than `sudo make install`. Even if we compare them both as anti-patterns. Plus, `make` requires a few dependencies. But when you install a package, all the logic/doctor checks can be implemented on the `ports` binary level. Install CLT, Xcode, check the environment, etc. Simple is better. On Sat, May 22, 2021 at 2:31 PM Joshua Root <jmr at macports.org <http://macports.org/> wrote: > > 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). > Yes, this is the idea. And it seems manageable to implement. Proper short links, a few lines to produce/validate them in release scripts, profit. P.S. I have started to build a simple version of such a script[1] based on the advice from the discussion. Please, join if you desire to improve the script and propose it as a source for the one-liner we are talking about. Regards, Artem [1] https://gist.github.com/dive/c4a51179aa96d229a32dd3492e5fdc2d > On 22 May 2021, at 19:55, Jason Liu <[email protected]> wrote: > > > On Sat, May 22, 2021 at 1:35 PM Ken Cunningham > <[email protected] <mailto:[email protected]>> > wrote: > 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. > > 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. > > 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. > > 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. > > 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. > > On Sat, May 22, 2021 at 2:31 PM Joshua Root <[email protected] > <mailto:[email protected]>> wrote: > > 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). > > 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: > > 3. Install MacPorts for your version of the operating system: > * macOS Big Sur v11 > <https://github.com/macports/macports-base/releases/download/v2.7.0/MacPorts-2.7.0-11-BigSur.pkg> > * macOS Cataline v10.15 > <https://github.com/macports/macports-base/releases/download/v2.7.0/MacPorts-2.7.0-10.15-Catalina.pkg> > * macOS Mojave v10.14 > <https://github.com/macports/macports-base/releases/download/v2.7.0/MacPorts-2.7.0-10.14-Mojave.pkg> > * Older OS? See here. <https://www.macports.org/install.php#installing> > -- > Jason Liu > >
