From 3f39e46bc7bfb5a6452730e56fc80281a442b2cf Mon Sep 17 00:00:00 2001 From: rickokid Date: Wed, 27 Mar 2024 17:09:01 +1300 Subject: [PATCH 1/2] Update EndNote20.pkg.recipe to install CWYW bundle in postinstall script Added a postinstall script that installs the CWYW bundle, using wildcards to try and future proof against name changes in the bundle or newer versions of Office. --- EndNote/EndNote20.pkg.recipe | 39 ++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/EndNote/EndNote20.pkg.recipe b/EndNote/EndNote20.pkg.recipe index 95d1304..36c5f6e 100644 --- a/EndNote/EndNote20.pkg.recipe +++ b/EndNote/EndNote20.pkg.recipe @@ -61,6 +61,8 @@ Applications 0775 + Scripts + 0775 pkgroot %RECIPE_CACHE_DIR%/pkgroot @@ -68,6 +70,40 @@ Processor PkgRootCreator + + Processor + FileMover + Comment + Move the Scripts folder created as part of the pkgroot out to the root of the RECIPE_CACHE_DIR so we can use it in the PkgCreator processor. + Arguments + + source + %RECIPE_CACHE_DIR%/pkgroot/Scripts + target + %RECIPE_CACHE_DIR%/Scripts + + + + Processor + FileCreator + Comment + Create postinstall script to install the Cite While You Write plugin bundle, using wildcards to try and future-proof against EndNote changing the bundle name and different versions of Office. + Arguments + + file_path + %RECIPE_CACHE_DIR%/Scripts/postinstall + file_mode + 0755 + file_content + #!/bin/sh + +CWYW=$(ls -d "/Applications/EndNote 20/Cite While You Write/EndNote CWYW"*.bundle) +PluginDir=$(ls -d "/Library/Application Support/Microsoft/Office"*"/User Content.localized/Startup.localized/Word") + +echo "Copying '$CWYW' to '$PluginDir/' ..." +cp -R "$CWYW" "$PluginDir/" + + Arguments @@ -106,6 +142,8 @@ flat version %version% + scripts + Scripts Processor @@ -121,6 +159,7 @@ %RECIPE_CACHE_DIR%/EndNote.zip %RECIPE_CACHE_DIR%/unarchive %RECIPE_CACHE_DIR%/pkgroot + %RECIPE_CACHE_DIR%/Scripts From 0a8aa8a064914786f28ca1e2987f0c3073ae9bbf Mon Sep 17 00:00:00 2001 From: rickokid Date: Wed, 27 Mar 2024 17:21:04 +1300 Subject: [PATCH 2/2] Update EndNote21.pkg.recipe to install CWYW bundle in postinstall script Added a postinstall script that installs the CWYW bundle, using wildcards to try and future proof against name changes in the bundle or newer versions of Office. --- EndNote/EndNote21.pkg.recipe | 39 ++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/EndNote/EndNote21.pkg.recipe b/EndNote/EndNote21.pkg.recipe index 749db7f..9535bb1 100644 --- a/EndNote/EndNote21.pkg.recipe +++ b/EndNote/EndNote21.pkg.recipe @@ -61,6 +61,8 @@ Applications 0775 + Scripts + 0775 pkgroot %RECIPE_CACHE_DIR%/pkgroot @@ -68,6 +70,40 @@ Processor PkgRootCreator + + Processor + FileMover + Comment + Move the Scripts folder created as part of the pkgroot out to the root of the RECIPE_CACHE_DIR so we can use it in the PkgCreator processor. + Arguments + + source + %RECIPE_CACHE_DIR%/pkgroot/Scripts + target + %RECIPE_CACHE_DIR%/Scripts + + + + Processor + FileCreator + Comment + Create postinstall script to install the Cite While You Write plugin bundle, using wildcards to try and future-proof against EndNote changing the bundle name and different versions of Office. + Arguments + + file_path + %RECIPE_CACHE_DIR%/Scripts/postinstall + file_mode + 0755 + file_content + #!/bin/sh + +CWYW=$(ls -d "/Applications/EndNote 21/Cite While You Write/EndNote CWYW"*.bundle) +PluginDir=$(ls -d "/Library/Application Support/Microsoft/Office"*"/User Content.localized/Startup.localized/Word") + +echo "Copying '$CWYW' to '$PluginDir/' ..." +cp -R "$CWYW" "$PluginDir/" + + Arguments @@ -106,6 +142,8 @@ flat version %version% + scripts + Scripts Processor @@ -121,6 +159,7 @@ %RECIPE_CACHE_DIR%/EndNote.zip %RECIPE_CACHE_DIR%/unarchive %RECIPE_CACHE_DIR%/pkgroot + %RECIPE_CACHE_DIR%/Scripts