slackware-current/source/a/less/doinst.sh
Patrick J Volkerding 983b468de9 Thu May 23 18:47:30 UTC 2024
a/etc-15.1-x86_64-12.txz:  Rebuilt.
  Remove less related profile variables from /etc/profile.
a/exfatprogs-1.2.3-x86_64-1.txz:  Upgraded.
a/less-655-x86_64-2.txz:  Rebuilt.
  Create /etc/profile.d/less.{csh,sh} for less related profile variables.
  By default, don't display the informational messages on the top line
  of the output (this can be configured in less.{csh,sh}.
  Don't attempt special handling of .log files as it breaks viewing a file
  such as foo.log.bz2.
d/parallel-20240522-noarch-1.txz:  Upgraded.
l/python-trove-classifiers-2024.5.22-x86_64-1.txz:  Upgraded.
x/mesa-24.1.0-x86_64-1.txz:  Upgraded.
x/xterm-392-x86_64-1.txz:  Upgraded.
xap/pavucontrol-6.0-x86_64-1.txz:  Upgraded.
2024-05-23 21:28:36 +02:00

17 lines
419 B
Bash

#!/bin/sh
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...
}
config etc/profile.d/less.csh.new
config etc/profile.d/less.sh.new