Skip to content

Commit

Permalink
Fix package symbolic link install error
Browse files Browse the repository at this point in the history
On macOS, the directory /usr/local/bin/ is not created by default.
Therefore, the postinstall script that generated the munkitap symbolic
link would fail on systems where it did not already exist. This error
can be avoided by installing the symbolic link as part of the package
and not by a script. The pkg build script has been updated to
automatically include the symbolic link and the postinstall script has
been removed.

The package version has been bumped up to reflect this change.
  • Loading branch information
jacobfgrant committed Oct 7, 2018
1 parent 4126ab7 commit 74528c7
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 28 deletions.
2 changes: 1 addition & 1 deletion package/build-info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@
<key>suppress_bundle_relocation</key>
<true/>
<key>version</key>
<string>0.2.0</string>
<string>0.2.1</string>
</dict>
</plist>
16 changes: 7 additions & 9 deletions package/munkitap_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
# Created by Jacob F. Grant
#
# Written: 06/28/18
# Updated: 06/28/18
# Updated: 10/07/18
#


Expand All @@ -27,16 +27,10 @@ then
exit 2
fi

if [ ! -f "./scripts/postinstall" ]
then
echo 'missing postinstall script'
exit 3
fi

if [ ! -f "../code/munkitap" ] || [ ! -d "../code/munkitaplib" ]
then
echo 'munkitap files not found'
exit 4
exit 3
fi

# Create payload directory
Expand All @@ -45,10 +39,14 @@ then
rm -r ./payload
fi
mkdir -p ./payload/Library/Munkitap/
mkdir -p ./payload/usr/local/bin/

# Move files
# Copy munkitap files
cp ../code/munkitap ./payload/Library/Munkitap/
cp -r ../code/munkitaplib ./payload/Library/Munkitap/

# Create symbolic link in /usr/local/bin/
ln -s /Library/Munkitap/munkitap ./payload/usr/local/bin/munkitap

# Build package
"$MUNKIPKG" .
18 changes: 0 additions & 18 deletions package/scripts/postinstall

This file was deleted.

0 comments on commit 74528c7

Please sign in to comment.