Attempt (blindly--I don't have a Mac) to fix
authorJeff Morriss <jeff.morriss@ulticom.com>
Mon, 12 Apr 2010 16:26:27 +0000 (16:26 -0000)
committerJeff Morriss <jeff.morriss@ulticom.com>
Mon, 12 Apr 2010 16:26:27 +0000 (16:26 -0000)
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=2844 :

Quote all references to $HOME in case that variable has a space in it.

svn path=/trunk/; revision=32449

packaging/macosx/Resources/bin/wireshark
packaging/macosx/Resources/script

index 358dbf0bcb47d228610ae0e5302a12a378b28d48..31cb0ef3108a07673133b9edaa7354ddb3cd21f9 100755 (executable)
@@ -49,7 +49,7 @@ if [ "$APPNAME" == "wireshark" ] ; then # Apply GUI settings
        export GNOME_VFS_MODULE_PATH="$TOP/lib/gnome-vfs-2.0/modules"
 
        # Set GTK theme (only if there is no .gtkrc-2.0 in the user's home)
-       if [[ ! -e $HOME/.gtkrc-2.0 ]]; then
+       if [[ ! -e "$HOME/.gtkrc-2.0" ]]; then
                # prepare the theme depending on OS X appearance settings
                (
                        cd "$TOP/themes/Clearlooks-Quicksilver-OSX/gtk-2.0/"
@@ -69,15 +69,15 @@ if [ "$APPNAME" == "wireshark" ] ; then # Apply GUI settings
        # This '#' needs to be escaped in pango.modules for Pango to work properly.
        ESCAPEDTOP=`echo $TOP | sed 's/#/\\\\\\\\#/'`
 
-       mkdir -p ${HOME}/.wireshark-etc
-       sed 's|${HOME}|'"$HOME|g" "$TOP/etc/pango/pangorc" > ${HOME}/.wireshark-etc/pangorc
+       mkdir -p "${HOME}/.wireshark-etc"
+       sed 's|\\${HOME}|'"\"$HOME\"|g" "$TOP/etc/pango/pangorc" > "${HOME}/.wireshark-etc/pangorc"
        sed 's|${CWD}|'"$ESCAPEDTOP|g" "$TOP/etc/pango/pango.modules" \
-               > ${HOME}/.wireshark-etc/pango.modules
-       cp -f "$TOP/etc/pango/pangox.aliases" ${HOME}/.wireshark-etc/
+               > "${HOME}/.wireshark-etc/pango.modules"
+       cp -f "$TOP/etc/pango/pangox.aliases" "${HOME}/.wireshark-etc/"
        sed 's|${CWD}|'"$TOP|g" "$TOP/etc/gtk-2.0/gtk.immodules" \
-               > ${HOME}/.wireshark-etc/gtk.immodules
+               > "${HOME}/.wireshark-etc/gtk.immodules"
        sed 's|${CWD}|'"$TOP|g" "$TOP/etc/gtk-2.0/gdk-pixbuf.loaders" \
-               > ${HOME}/.wireshark-etc/gdk-pixbuf.loaders
+               > "${HOME}/.wireshark-etc/gdk-pixbuf.loaders"
 fi
 
 exec "$CWD/$APPNAME-bin" "$@"
index 0d918ab4151d8a8c7951c4ce4373f8d20a4f6938..f2633239572476fca2018d35e3d4d440de7f6514 100755 (executable)
@@ -11,18 +11,18 @@ CWD="`dirname \"$0\"`"
 export VERSION=`/usr/bin/sw_vers | grep ProductVersion | cut -f2 -d'.'`
 
 # On Leopard, X11.app is installed by default, and will be started
-# automatically via launchd.  On older systems, we need to start 
+# automatically via launchd.  On older systems, we need to start
 # X11 ourself.
 
 # For Panther and Tiger, start X11
 if [[ $VERSION -le 4 ]]; then
-       # FIXME apparently this removes the xterm that starts with X 
-       # from xinitrc but when is it really used? Should we modify 
+       # FIXME apparently this removes the xterm that starts with X
+       # from xinitrc but when is it really used? Should we modify
        # the .xinitrc of the user without warning?
        ps -wx -ocommand | grep -e '[X]11' > /dev/null
-       if [ "$?" != "0" -a ! -f ${HOME}/.xinitrc ]; then
-           echo "rm -f ${HOME}/.xinitrc" > ${HOME}/.xinitrc
-           sed 's/xterm/# xterm/' /usr/X11R6/lib/X11/xinit/xinitrc >> ${HOME}/.xinitrc
+       if [ "$?" != "0" -a ! -f "${HOME}/.xinitrc" ]; then
+           echo "rm -f \"${HOME}/.xinitrc\"" > "${HOME}/.xinitrc"
+           sed 's/xterm/# xterm/' /usr/X11R6/lib/X11/xinit/xinitrc >> "${HOME}/.xinitrc"
        fi
 
        # Start X11 and get DISPLAY
@@ -42,7 +42,7 @@ fi
 
 
 # Warn the user about time-consuming generation of fontconfig caches.
-test -f ${HOME}/.wireshark/.fccache-new || exit 12
+test -f "${HOME}/.wireshark/.fccache-new" || exit 12
 
 
 BASE="`echo "$0" | sed -e 's/\/Contents\/Resources\/script/\//'`"