Replace svn keywords with LM_SENSORS_VER constant

The keywords Revision, Date and Id were being expanded by Subversion
way back when the project was being maintained in Subversion. Now when
the project is maintained in git, the keywords are no longer expanded
and appear e.g. in the output of sensors-detect literally.

Drop the keywords, or replace them with LM_SENSORS_VER where
applicable.

The value of the constant will have to be updated manually every time
a new release is made.

Inspired by a similar change in i2c-tools (commit daa430031ffd;
thanks, Jean).
This commit is contained in:
Ondřej Lysoněk committed 2019-10-17 15:29:58 +02:00
1 parent c28d20d19d
commit 5c900c7e85
4 files changed
+6 -11

No files matched your search

+1
View File
@@ -11,6 +11,7 @@ Release steps:
- Update doc/developers/lm_sensors.lsm (Version, Entered-date and Primary-site)
- Update doc/libsensors-API.txt and SENSORS_API_VERSION in lib/sensors.h
- Update version.h
- grep for LM_SENSORS_VER and update values of the constant
- Commit
- Tag the release using git:
git tag V3-x-x
+3 -6
View File
@@ -38,12 +38,9 @@ foreach ('/usr/sbin', '/usr/local/sbin', '/sbin') {
#########################
use constant NO_CACHE => 1;
use constant LM_SENSORS_VER => '3.5.0';
use vars qw(@pci_adapters @chip_ids @ipmi_ifs @non_hwmon_chip_ids
$i2c_addresses_to_scan $revision @i2c_byte_cache %opt);
$revision = '$Revision$ ($Date$)';
$revision =~ s/\$\w+: (.*?) \$/$1/g;
$revision =~ s/ \([^()]*\)//;
$i2c_addresses_to_scan @i2c_byte_cache %opt);
# This is the list of SMBus or I2C adapters we recognize by their PCI
# signature. This is an easy and fast way to determine which SMBus or I2C
@@ -7511,7 +7508,7 @@ sub main
system("/sbin/service", "lm_sensors", "stop");
}
print "# sensors-detect revision $revision\n";
print "# sensors-detect version ".LM_SENSORS_VER."\n";
initialize_dmi_data();
print_dmi_summary();
print_kernel_version();
-2
View File
@@ -1,7 +1,5 @@
#!/bin/sh
#
# $Id$
#
# fancontrol
#
# chkconfig: 2345 90 01
+2 -3
View File
@@ -29,8 +29,7 @@
#
#
REVISION=$(echo '$Revision$' | cut -d' ' -f2)
REVDATE=$(echo '$Date$' | cut -d' ' -f2)
LM_SENSORS_VER='3.5.0'
PIDFILE="/var/run/fancontrol.pid"
if [ -f "$PIDFILE" ]
@@ -48,7 +47,7 @@ then
exit 1
fi
echo "# pwmconfig revision $REVISION ($REVDATE)"
echo "# pwmconfig version $LM_SENSORS_VER"
echo 'This program will search your sensors for pulse width modulation (pwm)'
echo 'controls, and test each one to see if it controls a fan on'
echo 'your motherboard. Note that many motherboards do not have pwm'