]> jfr.im git - solanum.git/blobdiff - ircd/version.c.SH
Support more human friendly k/d/x-line duration format
[solanum.git] / ircd / version.c.SH
index d5e76206168710861964e66712e5eb02a213e863..80cda0ffc209d1df97f38d9ac558ce50a8eb53e7 100644 (file)
@@ -1,13 +1,13 @@
 #!/bin/sh
 
 spitshell=cat
-package=IRC
+package=solanum
 
 echo "Extracting $package/src/version.c..."
 
 if test -r version.c.last
 then
-   generation=`sed -n 's/^char \*generation = \"\(.*\)\";/\1/p' < version.c.last`
+   generation=`sed -n 's/^const char \*generation = \"\(.*\)\";/\1/p' < version.c.last`
    if test ! "$generation" ; then generation=0; fi
 else
    generation=0
@@ -15,6 +15,9 @@ fi
 
 generation=`expr $generation + 1`
 
+if test -n "$SOURCE_DATE_EPOCH" -a "$EXTERNAL_BUILD_TIMESTAMP" = '' ; then
+    EXTERNAL_BUILD_TIMESTAMP=$SOURCE_DATE_EPOCH
+fi
 if test "$EXTERNAL_BUILD_TIMESTAMP" = ''; then
     creation=`LC_ALL=C date | \
 awk '{if (NF == 6) \
@@ -27,7 +30,7 @@ fi
 
 $spitshell >version.c <<!SUB!THIS!
 /*
- *   IRC - Internet Relay Chat, src/version.c
+ *   $package - Internet Relay Chat, src/version.c
  *   Copyright (C) 1990 Chelsea Ashley Dyerman
  *
  *   This program is free software; you can redistribute it and/or modify
@@ -51,18 +54,20 @@ $spitshell >version.c <<!SUB!THIS!
 
 #include "patchlevel.h"
 #include "serno.h"
+#include "stdinc.h"
 
 const char *generation = "$generation";
 const char *creation = "$creation";
 const char *ircd_version = PATCHLEVEL;
 const char *serno = SERNO;
+const unsigned long int datecode = DATECODE;
 
 const char *infotext[] =
 {
   "$package --",
   "Based on the original code written by Jarkko Oikarinen",
-  "Copyright 1988, 1989, 1990, 1991 University of Oulu, Computing Center",
-  "Copyright (c) 1996-2001 Hybrid Development Team", 
+  "Copyright (c) 1988-1991 University of Oulu, Computing Center",
+  "Copyright (c) 1996-2001 Hybrid Development Team",
   "Copyright (c) 2002-2009 ircd-ratbox Development Team",
   "Copyright (c) 2005-2016 charybdis development team",
   " ",
@@ -73,13 +78,9 @@ const char *infotext[] =
   " ",
 !SUB!THIS!
 
-IFS='
-'
-for i in `grep -v '^$Id' ../CREDITS |tr -d '"'` ; do
-echo "  \"$i\"," >> version.c
-done
+sed 's/^$/ /;s/.*/\  "&\",/' ../CREDITS >> version.c
 $spitshell >>version.c <<!SUB!THISTOO!
-  "",
-  0,
+  " ",
+  NULL,
 };
 !SUB!THISTOO!