starttde updates: Add quotation marks to ensure $tdehome variable won't

break with spaces in the directory name. Moved R14 XDG updating snippets
to a separate script named r14-xdg-update.
(part of the original commit)
(cherry picked from commit 5464fc6fc6)
v3.5.13-sru
Darrell Anderson 13 years ago committed by Slávek Banko
parent 5e71bdd0b1
commit c26dae8330

@ -266,10 +266,10 @@ export DESKTOP_SESSION=trinity
if [ ! -d "$HOME/.trinity" ]; then if [ ! -d "$HOME/.trinity" ]; then
echo "[startkde] Creating $HOME/.trinity." 1>&2 echo "[startkde] Creating $HOME/.trinity." 1>&2
fi fi
mkdir -m 700 -p $kdehome mkdir -m 700 -p "$kdehome"
mkdir -m 700 -p $kdehome/share mkdir -m 700 -p "$kdehome/share"
mkdir -m 700 -p $kdehome/share/config mkdir -m 700 -p "$kdehome/share/config"
cat >$kdehome/share/config/startupconfigkeys <<EOF cat >"$kdehome/share/config/startupconfigkeys" <<EOF
kcminputrc Mouse cursorTheme '' kcminputrc Mouse cursorTheme ''
kcminputrc Mouse cursorSize '' kcminputrc Mouse cursorSize ''
kpersonalizerrc General FirstLogin true kpersonalizerrc General FirstLogin true
@ -286,15 +286,15 @@ if test $? -ne 0; then
xmessage -center -geometry 500x100 "Could not start kstartupconfig. Check your installation." xmessage -center -geometry 500x100 "Could not start kstartupconfig. Check your installation."
fi fi
# $kdehome/share/config/startupconfig should exist but avoid script failure if not. # $kdehome/share/config/startupconfig should exist but avoid script failure if not.
if [ -r $kdehome/share/config/startupconfig ]; then if [ -r "$kdehome/share/config/startupconfig" ]; then
. $kdehome/share/config/startupconfig . "$kdehome/share/config/startupconfig"
fi fi
# Make sure a default wallpaper is set. # Make sure a default wallpaper is set.
if [ ! -e $kdehome/share/config/kdesktoprc ]; then if [ ! -e "$kdehome/share/config/kdesktoprc" ]; then
# With Trinity KDE this file should exist, but test first. # With Trinity KDE this file should exist, but test first.
if [ -r /usr/share/wallpapers/isadora.png.desktop ]; then if [ -r /usr/share/wallpapers/isadora.png.desktop ]; then
cat >$kdehome/share/config/kdesktoprc <<EOF cat >"$kdehome/share/config/kdesktoprc" <<EOF
[Desktop0] [Desktop0]
Wallpaper=isadora.png Wallpaper=isadora.png
WallpaperMode=Scaled WallpaperMode=Scaled
@ -399,11 +399,10 @@ else
KGTK_RC_KDE2=$KDEDIR/share/kgtk/.gtkrc-2.0-kde-kde4 KGTK_RC_KDE2=$KDEDIR/share/kgtk/.gtkrc-2.0-kde-kde4
fi fi
if [ ! -e $kdehome/env/gtk-qt-engine.rc.sh ] && [ -e $KGTK_RC_ENGINE ] if [ ! -e "$kdehome/env/gtk-qt-engine.rc.sh" ] && [ -e $KGTK_RC_ENGINE ]; then
then mkdir -p "$kdehome/env"
mkdir -p $kdehome/env cp -f $KGTK_RC_ENGINE "$kdehome/env"
cp -f $KGTK_RC_ENGINE $kdehome/env chmod 755 "$kdehome/env/gtk-qt-engine.rc.sh"
chmod 755 $kdehome/env/gtk-qt-engine.rc.sh
fi fi
if [ ! -e $HOME/.gtkrc-2.0-kde4 ] && [ -e $KGTK_RC_KDE1 ] if [ ! -e $HOME/.gtkrc-2.0-kde4 ] && [ -e $KGTK_RC_KDE1 ]
@ -592,9 +591,9 @@ if test "$kpersonalizerrc_general_firstlogin" = "true"; then
fi fi
# Remove moodin cache if we have a new wallpaper installed, jriddell. Distro-specific. # Remove moodin cache if we have a new wallpaper installed, jriddell. Distro-specific.
if [ -d $kdehome/share/apps/ksplash/cache/Moodin/kubuntu ]; then if [ -d "$kdehome/share/apps/ksplash/cache/Moodin/kubuntu" ]; then
if [ /usr/share/wallpapers/kubuntu-wallpaper.png -nt $kdehome/share/apps/ksplash/cache/Moodin/kubuntu/ ]; then if [ /usr/share/wallpapers/kubuntu-wallpaper.png -nt "$kdehome/share/apps/ksplash/cache/Moodin/kubuntu/" ]; then
rm -rf $kdehome/share/apps/ksplash/cache/Moodin/kubuntu/ rm -rf "$kdehome/share/apps/ksplash/cache/Moodin/kubuntu/"
fi fi
fi fi

Loading…
Cancel
Save