È possibile installare un .pkg usando un terminale? (Volevo installare un'app tramite ssh).
È possibile installare un .pkg usando un terminale? (Volevo installare un'app tramite ssh).
The installer command is used to install Mac OS X installer packages to a specified domain or volume. The installer command installs a single package per invocation, which is specified with the -package parameter ( -pkg is accepted as a synonym). It may be either a single package or a metapackage. In the case of the metapackage, the packages which are part of the default install will be installed unless disqualified by a package's check tool(s).
 Visualizza   man installer    per la funzionalità completa. Spesso 
sudo installer -pkg /path/to/package.pkg -target /
è tutto ciò che è necessario.
 Installa tutti i file   .pkg    dalla cartella corrente a   /Applications   : 
for f in *.pkg ; 
    do sudo installer -verbose -pkg "$f" -target /
done
 In alternativa puoi installare i pacchetti nella tua cartella Inizio con   -target ~   . Finiranno in   /Users/<your_account>/Applications    a meno che un percorso specifico non sia predefinito nel programma di installazione. 
If you need to see what exactly an pkg installer contains and what pre- and post-install scripts will be run then you could install SuspiciousPackage (freeware), and use quick preview from Finder while the
.pkgfile is selected. Pressing spacebar in Finder with the file selected should work too.