Composer variable question

f_zinck
New Contributor

Hi Guys, I guess the question has been posted several times but I can't find what I'm looking for.
I need to create packages with composer for one of my non-jamf customer.

Exemple : installing Google Chrome with a custom home page, but the users home directory on my client's computers match the first name of each users.

Composer is create the package with my user folder. Is there a way to use the ~ variable instead of the folder name ?

Sorry for the english, I'm french !

Thanks...

Fred

3 REPLIES 3

mm2270
Legendary Contributor III

Composer won't be able to use something like ~ to direct files in a payload at the current user's home folder. What I would recommend instead is dropping some or all of the files in your payload into a custom location in /private/tmp/ first, and then use a postinstall script to locate the current user's home directory and subsequent folders, like ~/Library/ for example, and finally move the files into place. That's really the only option I can think of when building standalone packages like that. Its actually the way most commercial installers typically work when they need to place files in specific user locations.

f_zinck
New Contributor

Thank you for the response...

bentoms
Release Candidate Programs Tester

@f.zinck I'd create a PKG of the Chrome.app to deploy.. & then manage the homepage with a profile.

This can then be installed via another PKG or whatever they have in place.