diff options
author | Eric Hameleers <alien@slackware.com> | 2017-12-22 21:45:40 +0100 |
---|---|---|
committer | Eric Hameleers <alien@slackware.com> | 2017-12-22 21:45:40 +0100 |
commit | 93b6fa2bf460b36ac6e7e5d2716e26d69ff56c88 (patch) | |
tree | 68cdee350a051a36ed407ff10761d77e0774d79a /deps/ConsoleKit2/doinst.sh | |
parent | 46640130d942d93fea98569482a7118f21665e24 (diff) | |
download | ktown-93b6fa2bf460b36ac6e7e5d2716e26d69ff56c88.tar.gz ktown-93b6fa2bf460b36ac6e7e5d2716e26d69ff56c88.tar.xz |
Wayland deps updated - ConsoleKit2, mesa and xorg-server
These will be used in the 'testing' repository, not in the 'latest'.
Diffstat (limited to 'deps/ConsoleKit2/doinst.sh')
-rw-r--r-- | deps/ConsoleKit2/doinst.sh | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/deps/ConsoleKit2/doinst.sh b/deps/ConsoleKit2/doinst.sh new file mode 100644 index 0000000..c13a36e --- /dev/null +++ b/deps/ConsoleKit2/doinst.sh @@ -0,0 +1,27 @@ +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... +} + +preserve_perms() { + NEW="$1" + OLD="$(dirname $NEW)/$(basename $NEW .new)" + if [ -e $OLD ]; then + cp -a $OLD ${NEW}.incoming + cat $NEW > ${NEW}.incoming + mv ${NEW}.incoming $NEW + fi + config $NEW +} + +config etc/ConsoleKit/seats.d/00-primary.seat.new +preserve_perms etc/rc.d/rc.consolekit.new + |