Commit 5bd0c352 authored by Mikhail Efremov's avatar Mikhail Efremov

Rename Templates dir from /etc/skel to XDG_TEMPLATES_DIR.

If $HOME/Templates is exist xdg-update-user-dirs set it as XDG_TEMPLATES_DIR. So rename Templates to XDG-Templates.skel and move it by our own profile.d script.
parent 50941b1e
......@@ -270,7 +270,7 @@ pushd notes
%makeinstall
popd
mkdir -p %buildroot/etc/skel/Templates/
mkdir -p %buildroot/etc/skel/XDG-Templates.skel/
cp -r xfce-settings/etcskel/* %buildroot/etc/skel/
cp -r xfce-settings/etcskel/.config %buildroot/etc/skel/
......@@ -286,8 +286,8 @@ install -m 644 xfce-settings/backgrounds/vladstudio.com/LICENSE.txt %buildroot/u
install -m 644 xfce-settings/backgrounds/vladstudio.com/1600x1200/* %buildroot/usr/share/xfce4/backdrops/vladstudio.com/1600x1200/
install -m 644 xfce-settings/backgrounds/vladstudio.com/1680x1050/* %buildroot/usr/share/xfce4/backdrops/vladstudio.com/1680x1050/
install -m 644 xfce-settings/backgrounds/slinux*.jpg %buildroot/usr/share/xfce4/backdrops/
#popd
install -pDm0755 xfce-settings/scripts/zdg-move-templates.sh %buildroot%_sysconfdir/X11/profile.d/zdg-move-templates.sh
#slideshow
mkdir -p %buildroot/usr/share/install2/slideshow
......@@ -373,7 +373,8 @@ subst "s/Theme=.*/Theme=%theme/" /etc/plymouth/plymouthd.conf
%_datadir/alt-notes/*
%files xfce-settings
/etc/skel/Templates/
%_sysconfdir/X11/profile.d/zdg-move-templates.sh
/etc/skel/XDG-Templates.skel/
/etc/skel/.wm-select
/etc/skel/.fonts.conf
/etc/skel/.config
......
#!/bin/sh
# Move XDG-Templates.skel/ to XDG_TEMPLATES_DIR.
SKEL_TEMPLATES_DIR="$HOME/XDG-Templates.skel"
if [ -d "$SKEL_TEMPLATES_DIR" -a -f "$HOME/.config/user-dirs.dirs" -a \
! -L "$SKEL_TEMPLATES_DIR" ]; then
. "$HOME/.config/user-dirs.dirs"
if [ -n "$XDG_TEMPLATES_DIR" -a "$XDG_TEMPLATES_DIR" != "$HOME" -a \
"$XDG_TEMPLATES_DIR" != "$SKEL_TEMPLATES_DIR" ]; then
if [ -d "$XDG_TEMPLATES_DIR" ] && rmdir "$XDG_TEMPLATES_DIR" ||
mkdir -p "${XDG_TEMPLATES_DIR%/*}"; then
mv "$SKEL_TEMPLATES_DIR" "$XDG_TEMPLATES_DIR" ||:
fi
fi
fi
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment