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 12 years ago committed by Slávek Banko
parent 5e71bdd0b1
commit c26dae8330

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

Loading…
Cancel
Save