Skip to content

Commit beeba44

Browse files
committed
Fix build.sh and preinstall scripts.
1 parent ec24eb4 commit beeba44

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

build.sh

+7
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,19 @@ TMPROOT="/tmp/mmbuild-root.$$"
1313
mkdir -p "$TMPROOT"
1414
mkdir -p "$TMPROOT"/usr/local/managedmac
1515
mkdir -p "$TMPROOT"/usr/local/managedmac/mmlib
16+
mkdir -p "$TMPROOT"/usr/local/managedmac/plugins/actions
1617
mkdir -p "$TMPROOT"/Library/LaunchDaemons
1718

1819
cp -a source/managedmac "$TMPROOT"/usr/local/managedmac
1920
cp -a source/mmlib/*.py "$TMPROOT"/usr/local/managedmac/mmlib
21+
cp -a source/plugins/actions/*.py "$TMPROOT"/usr/local/managedmac/plugins/actions
2022
cp -a launchd/LaunchDaemons/com.github.managedmac-auto.plist "$TMPROOT"/Library/LaunchDaemons
2123

2224
pkgbuild --root "$TMPROOT" --identifier "$IDENTIFIER" --version "$VERSION" --install-location / --scripts package_scripts managedmac.pkg
25+
if [ $? -eq 0 ]; then
26+
echo "Built version $VERSION"
27+
fi
28+
2329

2430
rm -rf "$TMPROOT"
31+

package_scripts/preinstall

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33

44
if [ "$3" = "/" ]; then
55
if [ -e /Library/LaunchDaemons/com.github.managedmac-managedprinters-check.plist ]; then
6-
launchctl unload /Library/LaunchDaemons/com.github.managedmac-managedprinters-check.plist
6+
launchctl unload /Library/LaunchDaemons/com.github.managedmac-managedprinters-check.plist
7+
fi
78
fi
89

910
exit 0

0 commit comments

Comments
 (0)