Skip to main content
Question

Composer variable question

  • December 7, 2016
  • 3 replies
  • 6 views

Forum|alt.badge.img+2

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

mm2270
Forum|alt.badge.img+24
  • Legendary Contributor
  • December 7, 2016

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.


Forum|alt.badge.img+2
  • Author
  • New Contributor
  • December 8, 2016

Thank you for the response...


bentoms
Forum|alt.badge.img+35
  • Hall of Fame
  • December 10, 2016

@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.