[cvslog] (2003-04-16 21:53:43 UTC) Module eggdrop1.6: Change committed

cvslog cvs at tsss.org
Wed Apr 16 15:53:43 CST 2003


CVSROOT    : /usr/local/cvsroot
Module     : eggdrop1.6
Commit time: 2003-04-16 21:53:43 UTC
Commited by: Will Buckner <wcc at techmonkeys.org>

Modified files:
     misc/addpatch src/patch.h

Log message:

* Updates to addpatch.

---------------------- diff included ----------------------
Index: eggdrop1.6/misc/addpatch
diff -u eggdrop1.6/misc/addpatch:1.4 eggdrop1.6/misc/addpatch:1.5
--- eggdrop1.6/misc/addpatch:1.4	Tue Mar  4 20:09:14 2003
+++ eggdrop1.6/misc/addpatch	Wed Apr 16 16:53:33 2003
@@ -24,8 +24,7 @@
 # configuration script generated by Autoconf, you may include it under
 # the same distribution terms that you use for the rest of that program.
 #
-# $Id: addpatch,v 1.4 2003/03/05 02:09:14 wcc Exp $
-
+# $Id: addpatch,v 1.5 2003/04/16 21:53:33 wcc Exp $
 
 show_usage()
 {
@@ -36,37 +35,39 @@
 	exit 1
 }
 
-if test "x$1" = "x"; then
+if [ "x${1}" = "x" ]; then
 	show_usage;
 else
 	patch_name=$1
 fi
 
-if test ! -f src/main.c; then
+if [ ! -f src/main.c ]; then
 	echo "You are not in the Eggdrop root directory."
 	exit 1
 fi
 
-if test "x$2" = "x"; then
+if [ "x${2}" = "x" ] || [ "$unix_time" = now ]; then
 	unix_time=`date +%s`
 	echo "Setting unixtime to now."
 else
 	unix_time=$2
 fi
 
-if test "${unix_time}" = now; then
-	unix_time=`date +%s`
-	echo "Setting unixtime to now."
+oldpatch_name=`cat src/patch.h | grep -E '^patch.*\);$'| awk '-F"' '{ print $2 }'`
+
+if [ "x${oldpatch_name}" = "x" ]; then
+	oldpatch_name='(could not detect)'
 fi
 
-echo "Patching src/patch.h:"
-echo "   unixtime: ${unix_time}, patch name: ${patch_name}"
-if sed src/patch.h -e "s/^patch.*\")\(.*current unixtime.*\)/patch(\"${unix_time}\")\1/" -e "s/^patch.*);$/patch(\"${patch_name}\");/" > src/patch.h_
-then
+echo "Modifying src/patch.h:"
+echo "   unixtime: ${unix_time}"
+echo "   old patch name: ${oldpatch_name}"
+echo "   new patch name: ${patch_name}"
+
+if sed src/patch.h -e "s/^patch.*\")\(.*current unixtime.*\)/patch(\"${unix_time}\")\1/" -e "s/^patch.*);$/patch(\"${patch_name}\");/" > src/patch.h_; then
 	mv src/patch.h_ src/patch.h
+	echo "Modification successful."
 else
 	echo "Failed to adjust src/patch.h"
 	exit 1
 fi
-
-exit 0
Index: eggdrop1.6/src/patch.h
diff -u eggdrop1.6/src/patch.h:1.980 eggdrop1.6/src/patch.h:1.981
--- eggdrop1.6/src/patch.h:1.980	Wed Apr 16 16:25:16 2003
+++ eggdrop1.6/src/patch.h	Wed Apr 16 16:53:33 2003
@@ -10,7 +10,7 @@
  * statement, leave the rest of the file alone, this allows better
  * overlapping patches.
  *
- * $Id: patch.h,v 1.980 2003/04/16 21:25:16 wcc Exp $
+ * $Id: patch.h,v 1.981 2003/04/16 21:53:33 wcc Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -41,12 +41,12 @@
  *
  *
  */
-patch("1050528273");            /* current unixtime */
+patch("1050530001");            /* current unixtime */
 /*
  *
  *
  */
-patch("servport");
+patch("addpatch");
 /*
  *
  *
----------------------- End of diff -----------------------


More information about the Changes mailing list