how to copy from repository-dir to cache-dir

62 views
Skip to first unread message

Matthias Bretz

unread,
May 28, 2021, 4:23:04 AM5/28/21
to autopkg-discuss
Hi, I'm trying to write a recipe to patch a LibreOffice with the corresponding language-pack. I have all parts together but I need to copy a custom AppleScript from the repository-directory to the cache-directory.
As there is %RECIPE_CACHE_DIR% I was wondering if there is some thing like this to reference. I tried %RECIPE_REPO_DIR% but it doesn't work.

Hopefully someone can help me with this.

Wuppertal Institut fuer Klima, Umwelt, Energie gGmbH l Sitz der Gesellschaft/Registered Office: Wuppertal, Germany;
Registergericht/Registered at: Amtsgericht Wuppertal, Germany l Eintragungs-Nr./Registration no.: HRB 7619; 
USt.-ID Nr./VAT ID No.: DE 121 091 633
Wissenschaftlicher Geschaeftsfuehrer/ Scientific Managing Director: Prof. Dr. Manfred Fischedick 
Kaufmaennischer Geschaeftsfuehrer/ Administrative Managing Director: Michael Dedek
Aufsichtsratsvorsitzender/ Chairman of the Supervisory Board: Staatssekretaer/ State Secretary Christoph Dammermann

Daniel Moore

unread,
May 28, 2021, 7:41:37 AM5/28/21
to autopkg...@googlegroups.com
You should be able to use %RECIPE_DIR%. See this recipe for an example: https://github.com/autopkg/gregneagle-recipes/blob/master/Mozilla/FirefoxAutoconfig.pkg.recipe

On May 28, 2021, at 4:23 AM, Matthias Bretz <matthia...@wupperinst.org> wrote:

Hi, I'm trying to write a recipe to patch a LibreOffice with the corresponding language-pack. I have all parts together but I need to copy a custom AppleScript from the repository-directory to the cache-directory.
--
You received this message because you are subscribed to the Google Groups "autopkg-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to autopkg-discu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/autopkg-discuss/b01f35cf-8874-4b22-a7d4-a13e42822e80n%40googlegroups.com.

Anthony Reimer

unread,
May 28, 2021, 8:57:15 AM5/28/21
to 'William Theaker' via autopkg-discuss
There are recipes out there that already do this kind of thing. The most common one was the FirefoxAutoconfig.pkg recipe from the core recipes repo, but that recipe is gone due to obsolescence. You can see another recipe based on it by Neil Martin that should give you the guidance you need:

https://github.com/autopkg/neilmartin83-recipes/blob/master/Mozilla/FirefoxPolicies.pkg.recipe

In short, %RECIPE_DIR% is the substitution you are looking for.


Anthony Reimer

Graham Pugh

unread,
May 28, 2021, 11:17:21 AM5/28/21
to autopkg...@googlegroups.com
I wonder if this recipe does the work you are trying to do? It's what I use to add the German language pack to LibreOffice:


Cheers,
Graham


Von meinem iPhone gesendet

Am 28.05.2021 um 14:57 schrieb Anthony Reimer <are...@ucalgary.ca>:

There are recipes out there that already do this kind of thing. The most common one was the FirefoxAutoconfig.pkg recipe from the core recipes repo, but that recipe is gone due to obsolescence. You can see another recipe based on it by Neil Martin that should give you the guidance you need:

Matthias Bretz

unread,
May 28, 2021, 11:17:21 AM5/28/21
to autopkg-discuss
You made my day and saved my work-week by this. Was searching for this for three days now. Works like charm.

Thanks, kind regards, Matthias

Matthias Bretz

unread,
May 31, 2021, 3:33:32 AM5/31/21
to autopkg...@googlegroups.com
Hi Graham, yes it does. I'm new to autopkg and as part of learning I try to create as much as possible on my own before copying existing recipes.
My approach was to use a modified version of the apples script which is included in the langpack-installer. But your solution (using the unarchiver-processor to directly unpack the tarball in the destination-app is far more elegant.
Thanks for pointing me to your solution.

Mit freundlichen Grüßen

Matthias


You received this message because you are subscribed to a topic in the Google Groups "autopkg-discuss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/autopkg-discuss/g2bNlE_t8lk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to autopkg-discu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/autopkg-discuss/B59A2836-C1F7-455D-A07A-DCE79E96A9F7%40gmail.com.
Reply all
Reply to author
Forward
0 new messages