summaryrefslogtreecommitdiff
path: root/desktop/xdm-slackware-theme/doinst.sh
diff options
context:
space:
mode:
authorSébastien Ballet <slacker6896@gmail.com>2019-07-05 22:34:45 +0700
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2019-07-05 22:34:45 +0700
commit6e739548019930e1e0ffe26e498c98bfa0ca3a0c (patch)
tree8b03443b7b10096f8d49b384244dc0018d91a0a6 /desktop/xdm-slackware-theme/doinst.sh
parentf57c7760c3e4372e5289f60f910b1fafe5bb4813 (diff)
downloadslackbuilds-6e739548019930e1e0ffe26e498c98bfa0ca3a0c.tar.gz
desktop/xdm-slackware-theme: Added (XDM Theme).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'desktop/xdm-slackware-theme/doinst.sh')
-rw-r--r--desktop/xdm-slackware-theme/doinst.sh47
1 files changed, 47 insertions, 0 deletions
diff --git a/desktop/xdm-slackware-theme/doinst.sh b/desktop/xdm-slackware-theme/doinst.sh
new file mode 100644
index 0000000000..95d502a019
--- /dev/null
+++ b/desktop/xdm-slackware-theme/doinst.sh
@@ -0,0 +1,47 @@
+# Handle the incoming configuration file
+#
+config() {
+ NEW="$1"
+ OLD="$(dirname $NEW)/$(basename $NEW .new)"
+
+ # If there's no config file by that name, mv it over:
+ #
+ if [ ! -r $OLD ]; then
+ mv $NEW $OLD
+ elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then
+ # toss the redundant copy
+ rm $NEW
+ fi
+ # Otherwise, we leave the .new copy for the admin to consider...
+}
+
+# backup /etc/X11/xdm/xdm-config, if required
+#
+XDM_CONFIG=/etc/X11/xdm/xdm-config
+CDATE=$(date +%Y%m%d)
+
+if [ -e ${XDM_CONFIG} ] && [ ! -L ${XDM_CONFIG} ] ; then
+ cat ${XDM_CONFIG} > ${XDM_CONFIG}.orig_${CDATE}
+fi
+
+config etc/X11/xdm/slackware/Xbuttons_bar.conf.new
+config etc/X11/xdm/slackware/Xresources.new
+config etc/X11/xdm/slackware/Xservers.new
+config etc/X11/xdm/slackware/Xsession.conf.new
+config etc/X11/xdm/slackware/Xsetup.conf.new
+
+config etc/X11/xdm/slackware/xdm-config.new
+
+config etc/X11/xdm/slackware/extensions.d/analog-clock.conf.new
+config etc/X11/xdm/slackware/extensions.d/conky-pseudo-transparent.conf.new
+config etc/X11/xdm/slackware/extensions.d/conky-real-transparent.conf.new
+config etc/X11/xdm/slackware/extensions.d/sysmon-conky.conf.new
+config etc/X11/xdm/slackware/extensions.d/xdm-screensaver.conf.new
+
+# Replaces /etc/X11/xdm/xdm-config by a symlink to
+# /etc/X11/xdm/slackware/xdm-config to enable the XDM theme...
+#
+(
+ cd etc/X11/xdm
+ ln -sf slackware/xdm-config xdm-config
+)