Publicizing MacPorts [installation]

Bjarne D Mathiesen macintosh at mathiesen.info
Sat May 22 17:12:04 UTC 2021



Artem Loenko 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.
> 

I'm 90% there there with this :
/usr/bin/env bash -c $( curl -fsSL --url
'https://trac.macports.org/raw-attachment/wiki/howto/AdvancedDailyAdm/macports.bash'
) install

When I'm running this as my normal un-privileged user,
it executes 🤓👍🏻 (and fails because it's un-privileged)

!!! but !!! if I try this as my admin user, nothing happens 🤔🤓👎🏻
There's some obscure security setting I presently can't fathom, because
I can run the script locally (without curl) without any issues. And it
does download - it just doesn't execute 👎🏻🤔🤓🤔👎🏻

but the following is presently a more complete solution, that also
provides the script for further use.

#!/usr/bin/env bash

declare
baseURL='https://trac.macports.org/raw-attachment/wiki/howto/AdvancedDailyAdm'

mkdir -p MacPorts
cd MacPorts
curl -O --url "${baseURL}/portDefaults"
curl -O --url "${baseURL}/macports.bash"
chmod +x *.bash
sudo macports.bash setpaths
sudo macports.bash install
macports.bash --help


-- 
Bjarne D Mathiesen
Korsør ; Danmark ; Europa
-----------------------------------------------------------------------
denne besked er skrevet i et totalt M$-frit miljø
OpenCore + macOS 10.15.7 Catalina
MacPro 2010 ; 2 x 3,46 GHz 6-Core Intel Xeon ; 256 GB 1333 MHz DDR3 ECC
ATI Radeon RX 590 8 GB


More information about the macports-dev mailing list