From eebecd3a72ee9fe075054d5c0174c081a2de0659 Mon Sep 17 00:00:00 2001 From: Jeff Morriss Date: Mon, 12 Apr 2010 16:26:27 +0000 Subject: Attempt (blindly--I don't have a Mac) to fix 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 | 14 +++++++------- packaging/macosx/Resources/script | 14 +++++++------- 2 files changed, 14 insertions(+), 14 deletions(-) (limited to 'packaging/macosx') diff --git a/packaging/macosx/Resources/bin/wireshark b/packaging/macosx/Resources/bin/wireshark index 358dbf0bcb..31cb0ef310 100755 --- a/packaging/macosx/Resources/bin/wireshark +++ b/packaging/macosx/Resources/bin/wireshark @@ -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" "$@" diff --git a/packaging/macosx/Resources/script b/packaging/macosx/Resources/script index 0d918ab415..f263323957 100755 --- a/packaging/macosx/Resources/script +++ b/packaging/macosx/Resources/script @@ -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/\//'`" -- cgit v1.2.3