Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update EndNote20.pkg.recipe and EndNote21.pkg.recipe to install CWYW bundle in postinstall script #189

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions EndNote/EndNote20.pkg.recipe
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,49 @@
<dict>
<key>Applications</key>
<string>0775</string>
<key>Scripts</key>
<string>0775</string>
</dict>
<key>pkgroot</key>
<string>%RECIPE_CACHE_DIR%/pkgroot</string>
</dict>
<key>Processor</key>
<string>PkgRootCreator</string>
</dict>
<dict>
<key>Processor</key>
<string>FileMover</string>
<key>Comment</key>
<string>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.</string>
<key>Arguments</key>
<dict>
<key>source</key>
<string>%RECIPE_CACHE_DIR%/pkgroot/Scripts</string>
<key>target</key>
<string>%RECIPE_CACHE_DIR%/Scripts</string>
</dict>
</dict>
<dict>
<key>Processor</key>
<string>FileCreator</string>
<key>Comment</key>
<string>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.</string>
<key>Arguments</key>
<dict>
<key>file_path</key>
<string>%RECIPE_CACHE_DIR%/Scripts/postinstall</string>
<key>file_mode</key>
<string>0755</string>
<key>file_content</key>
<string>#!/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/"</string>
</dict>
</dict>
<dict>
<key>Arguments</key>
<dict>
Expand Down Expand Up @@ -106,6 +142,8 @@
<string>flat</string>
<key>version</key>
<string>%version%</string>
<key>scripts</key>
<string>Scripts</string>
</dict>
</dict>
<key>Processor</key>
Expand All @@ -121,6 +159,7 @@
<string>%RECIPE_CACHE_DIR%/EndNote.zip</string>
<string>%RECIPE_CACHE_DIR%/unarchive</string>
<string>%RECIPE_CACHE_DIR%/pkgroot</string>
<string>%RECIPE_CACHE_DIR%/Scripts</string>
</array>
</dict>
</dict>
Expand Down
39 changes: 39 additions & 0 deletions EndNote/EndNote21.pkg.recipe
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,49 @@
<dict>
<key>Applications</key>
<string>0775</string>
<key>Scripts</key>
<string>0775</string>
</dict>
<key>pkgroot</key>
<string>%RECIPE_CACHE_DIR%/pkgroot</string>
</dict>
<key>Processor</key>
<string>PkgRootCreator</string>
</dict>
<dict>
<key>Processor</key>
<string>FileMover</string>
<key>Comment</key>
<string>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.</string>
<key>Arguments</key>
<dict>
<key>source</key>
<string>%RECIPE_CACHE_DIR%/pkgroot/Scripts</string>
<key>target</key>
<string>%RECIPE_CACHE_DIR%/Scripts</string>
</dict>
</dict>
<dict>
<key>Processor</key>
<string>FileCreator</string>
<key>Comment</key>
<string>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.</string>
<key>Arguments</key>
<dict>
<key>file_path</key>
<string>%RECIPE_CACHE_DIR%/Scripts/postinstall</string>
<key>file_mode</key>
<string>0755</string>
<key>file_content</key>
<string>#!/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/"</string>
</dict>
</dict>
<dict>
<key>Arguments</key>
<dict>
Expand Down Expand Up @@ -106,6 +142,8 @@
<string>flat</string>
<key>version</key>
<string>%version%</string>
<key>scripts</key>
<string>Scripts</string>
</dict>
</dict>
<key>Processor</key>
Expand All @@ -121,6 +159,7 @@
<string>%RECIPE_CACHE_DIR%/EndNote.zip</string>
<string>%RECIPE_CACHE_DIR%/unarchive</string>
<string>%RECIPE_CACHE_DIR%/pkgroot</string>
<string>%RECIPE_CACHE_DIR%/Scripts</string>
</array>
</dict>
</dict>
Expand Down