Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/external/bsd/ntp/scripts If the "importdate" file exists, do...
details: https://anonhg.NetBSD.org/src/rev/dbfd2df942fd
branches: trunk
changeset: 325991:dbfd2df942fd
user: apb <apb%NetBSD.org@localhost>
date: Wed Jan 15 12:58:23 2014 +0000
description:
If the "importdate" file exists, do not embed the date/time/build number
in the generated version. This logic was present in an earlier revision
of this file, but was lost in CVS revision 1.3 dated 2013-12-28.
Add a comment to make it less likely that this code is lost again.
diffstat:
external/bsd/ntp/scripts/mkver | 23 +++++++++++++++--------
1 files changed, 15 insertions(+), 8 deletions(-)
diffs (35 lines):
diff -r 754622559bbd -r dbfd2df942fd external/bsd/ntp/scripts/mkver
--- a/external/bsd/ntp/scripts/mkver Wed Jan 15 11:42:43 2014 +0000
+++ b/external/bsd/ntp/scripts/mkver Wed Jan 15 12:58:23 2014 +0000
@@ -15,16 +15,23 @@
*) ConfStr="${ConfStr}-o" ;;
esac
-ConfStr="$ConfStr `LC_TIME=C TZ=UTC date`"
+ifile="`dirname $0`/../importdate"
+
+if [ -f "$ifile" ]; then
+ # NetBSD MKREPRO: Don't embed current date/time/run number
+ ConfStr="$ConfStr "`cat "$ifile"`
+else
+ ConfStr="$ConfStr `LC_TIME=C TZ= date`"
-if [ ! -f .version ]; then
- echo 0 > .version
+ if [ ! -f .version ]; then
+ echo 0 > .version
+ fi
+ RUN="`cat .version`"
+ RUN="`expr $RUN + 1`"
+ echo $RUN > .version
+
+ ConfStr="$ConfStr (${RUN})"
fi
-RUN="`cat .version`"
-RUN="`expr $RUN + 1`"
-echo $RUN > .version
-
-ConfStr="$ConfStr (${RUN})"
echo "Version <${ConfStr}>";
Home |
Main Index |
Thread Index |
Old Index