aboutsummaryrefslogtreecommitdiffstats
path: root/packaging/macosx/Scripts
diff options
context:
space:
mode:
Diffstat (limited to 'packaging/macosx/Scripts')
-rwxr-xr-xpackaging/macosx/Scripts/cli-postinstall.sh3
-rwxr-xr-xpackaging/macosx/Scripts/cli-preinstall.sh22
2 files changed, 23 insertions, 2 deletions
diff --git a/packaging/macosx/Scripts/cli-postinstall.sh b/packaging/macosx/Scripts/cli-postinstall.sh
index ce85c03768..f83cf4faac 100755
--- a/packaging/macosx/Scripts/cli-postinstall.sh
+++ b/packaging/macosx/Scripts/cli-postinstall.sh
@@ -15,9 +15,8 @@ BINARIES="
cd "$CLI_PATH"
-rm -f ./wireshark
-mv utility-launcher wireshark
chmod 755 wireshark
+chown root:wheel wireshark
for BIN in $BINARIES ; do
rm -f ./"$BIN"
diff --git a/packaging/macosx/Scripts/cli-preinstall.sh b/packaging/macosx/Scripts/cli-preinstall.sh
new file mode 100755
index 0000000000..8a9c51a619
--- /dev/null
+++ b/packaging/macosx/Scripts/cli-preinstall.sh
@@ -0,0 +1,22 @@
+#!/bin/sh
+
+CLI_PATH="$2"
+
+# Create any missing directories with mode 755, owned by root:wheel.
+# Don't blindly clobber anything that's already there.
+function build_path()
+{
+ echo "Checking $1"
+ if [ -d "$1" ] ; then
+ return ""
+ else
+ TRIMMED=`dirname "$1"`
+ if [ ! -d "$TRIMMED" ] ; then
+ build_path "$TRIMMED"
+ fi
+ install -v -o root -g wheel -m 0755 -d "$1"
+ fi
+
+}
+
+build_path "$2"