summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--HISTORY2
-rw-r--r--Makefile6
-rw-r--r--PLUGINS/src/hello/Makefile4
-rw-r--r--PLUGINS/src/osddemo/Makefile4
-rw-r--r--PLUGINS/src/servicedemo/Makefile4
-rw-r--r--PLUGINS/src/skincurses/Makefile4
-rw-r--r--PLUGINS/src/sky/Makefile4
-rw-r--r--PLUGINS/src/status/Makefile4
-rw-r--r--PLUGINS/src/svdrpdemo/Makefile4
-rwxr-xr-xnewplugin4
10 files changed, 21 insertions, 19 deletions
diff --git a/HISTORY b/HISTORY
index 442b7d8b..c1ee18a9 100644
--- a/HISTORY
+++ b/HISTORY
@@ -4633,3 +4633,5 @@ Video Disk Recorder Revision History
- Updated the Russian OSD texts (thanks to Oleg Roitburd).
- Updated the Slovenian OSD texts (thanks to Matjaz Thaler).
- Fixed wrong credits for the patch that was used to implement cPlugin::Active().
+- Simplified the 'grep|awk|sed' command to retrieve the VDR/APIVERSION to a single
+ 'sed' call.
diff --git a/Makefile b/Makefile
index f5862139..38af4857 100644
--- a/Makefile
+++ b/Makefile
@@ -4,7 +4,7 @@
# See the main source file 'vdr.c' for copyright information and
# how to reach the author.
#
-# $Id: Makefile 1.87 2006/04/16 09:00:30 kls Exp $
+# $Id: Makefile 1.88 2006/04/22 09:58:44 kls Exp $
.DELETE_ON_ERROR:
@@ -81,8 +81,8 @@ DEFINES += -DPLUGINDIR=\"$(PLUGINLIBDIR)\"
# The version numbers of VDR and the plugin API (taken from VDR's "config.h"):
-VDRVERSION = $(shell grep 'define VDRVERSION ' config.h | awk '{ print $$3 }' | sed -e 's/"//g')
-APIVERSION = $(shell grep 'define APIVERSION ' config.h | awk '{ print $$3 }' | sed -e 's/"//g')
+VDRVERSION = $(shell sed -ne '/define VDRVERSION/ { s/^.*"\(.*\)".*$$/\1/; p }' config.h)
+APIVERSION = $(shell sed -ne '/define APIVERSION/ { s/^.*"\(.*\)".*$$/\1/; p }' config.h)
ifdef VFAT
# for people who want their video directory on a VFAT partition
diff --git a/PLUGINS/src/hello/Makefile b/PLUGINS/src/hello/Makefile
index 6f3dd4c7..2106cbf3 100644
--- a/PLUGINS/src/hello/Makefile
+++ b/PLUGINS/src/hello/Makefile
@@ -1,7 +1,7 @@
#
# Makefile for a Video Disk Recorder plugin
#
-# $Id: Makefile 1.12 2006/04/16 09:03:50 kls Exp $
+# $Id: Makefile 1.13 2006/04/22 09:59:44 kls Exp $
# The official name of this plugin.
# This name will be used in the '-P...' option of VDR to load the plugin.
@@ -30,7 +30,7 @@ TMPDIR = /tmp
### The version number of VDR's plugin API (taken from VDR's "config.h"):
-APIVERSION = $(shell grep 'define APIVERSION ' $(VDRDIR)/config.h | awk '{ print $$3 }' | sed -e 's/"//g')
+APIVERSION = $(shell sed -ne '/define APIVERSION/ { s/^.*"\(.*\)".*$$/\1/; p }' $(VDRDIR)/config.h)
### The name of the distribution archive:
diff --git a/PLUGINS/src/osddemo/Makefile b/PLUGINS/src/osddemo/Makefile
index 8a0aef4b..51317afc 100644
--- a/PLUGINS/src/osddemo/Makefile
+++ b/PLUGINS/src/osddemo/Makefile
@@ -1,7 +1,7 @@
#
# Makefile for a Video Disk Recorder plugin
#
-# $Id: Makefile 1.6 2006/04/16 09:03:55 kls Exp $
+# $Id: Makefile 1.7 2006/04/22 09:59:49 kls Exp $
# The official name of this plugin.
# This name will be used in the '-P...' option of VDR to load the plugin.
@@ -30,7 +30,7 @@ TMPDIR = /tmp
### The version number of VDR's plugin API (taken from VDR's "config.h"):
-APIVERSION = $(shell grep 'define APIVERSION ' $(VDRDIR)/config.h | awk '{ print $$3 }' | sed -e 's/"//g')
+APIVERSION = $(shell sed -ne '/define APIVERSION/ { s/^.*"\(.*\)".*$$/\1/; p }' $(VDRDIR)/config.h)
### The name of the distribution archive:
diff --git a/PLUGINS/src/servicedemo/Makefile b/PLUGINS/src/servicedemo/Makefile
index c76b871f..31e57a89 100644
--- a/PLUGINS/src/servicedemo/Makefile
+++ b/PLUGINS/src/servicedemo/Makefile
@@ -1,7 +1,7 @@
#
# Makefile for a Video Disk Recorder plugin
#
-# $Id: Makefile 1.4 2006/04/16 09:03:59 kls Exp $
+# $Id: Makefile 1.5 2006/04/22 09:59:55 kls Exp $
# The official name of this plugin.
# This name will be used in the '-P...' option of VDR to load the plugin.
@@ -31,7 +31,7 @@ TMPDIR = /tmp
### The version number of VDR's plugin API (taken from VDR's "config.h"):
-APIVERSION = $(shell grep 'define APIVERSION ' $(VDRDIR)/config.h | awk '{ print $$3 }' | sed -e 's/"//g')
+APIVERSION = $(shell sed -ne '/define APIVERSION/ { s/^.*"\(.*\)".*$$/\1/; p }' $(VDRDIR)/config.h)
### The name of the distribution archive:
diff --git a/PLUGINS/src/skincurses/Makefile b/PLUGINS/src/skincurses/Makefile
index 360b0d2f..ebb045f1 100644
--- a/PLUGINS/src/skincurses/Makefile
+++ b/PLUGINS/src/skincurses/Makefile
@@ -1,7 +1,7 @@
#
# Makefile for a Video Disk Recorder plugin
#
-# $Id: Makefile 1.4 2006/04/16 09:04:04 kls Exp $
+# $Id: Makefile 1.5 2006/04/22 10:00:03 kls Exp $
# The official name of this plugin.
# This name will be used in the '-P...' option of VDR to load the plugin.
@@ -30,7 +30,7 @@ TMPDIR = /tmp
### The version number of VDR's plugin API (taken from VDR's "config.h"):
-APIVERSION = $(shell grep 'define APIVERSION ' $(VDRDIR)/config.h | awk '{ print $$3 }' | sed -e 's/"//g')
+APIVERSION = $(shell sed -ne '/define APIVERSION/ { s/^.*"\(.*\)".*$$/\1/; p }' $(VDRDIR)/config.h)
### The name of the distribution archive:
diff --git a/PLUGINS/src/sky/Makefile b/PLUGINS/src/sky/Makefile
index e9435380..2fad8b5f 100644
--- a/PLUGINS/src/sky/Makefile
+++ b/PLUGINS/src/sky/Makefile
@@ -1,7 +1,7 @@
#
# Makefile for a Video Disk Recorder plugin
#
-# $Id: Makefile 1.6 2006/04/16 09:04:06 kls Exp $
+# $Id: Makefile 1.7 2006/04/22 10:00:17 kls Exp $
# The official name of this plugin.
# This name will be used in the '-P...' option of VDR to load the plugin.
@@ -30,7 +30,7 @@ TMPDIR = /tmp
### The version number of VDR's plugin API (taken from VDR's "config.h"):
-APIVERSION = $(shell grep 'define APIVERSION ' $(VDRDIR)/config.h | awk '{ print $$3 }' | sed -e 's/"//g')
+APIVERSION = $(shell sed -ne '/define APIVERSION/ { s/^.*"\(.*\)".*$$/\1/; p }' $(VDRDIR)/config.h)
### The name of the distribution archive:
diff --git a/PLUGINS/src/status/Makefile b/PLUGINS/src/status/Makefile
index e6525e9e..21f88171 100644
--- a/PLUGINS/src/status/Makefile
+++ b/PLUGINS/src/status/Makefile
@@ -1,7 +1,7 @@
#
# Makefile for a Video Disk Recorder plugin
#
-# $Id: Makefile 1.10 2006/04/16 09:04:10 kls Exp $
+# $Id: Makefile 1.11 2006/04/22 10:00:24 kls Exp $
# The official name of this plugin.
# This name will be used in the '-P...' option of VDR to load the plugin.
@@ -30,7 +30,7 @@ TMPDIR = /tmp
### The version number of VDR's plugin API (taken from VDR's "config.h"):
-APIVERSION = $(shell grep 'define APIVERSION ' $(VDRDIR)/config.h | awk '{ print $$3 }' | sed -e 's/"//g')
+APIVERSION = $(shell sed -ne '/define APIVERSION/ { s/^.*"\(.*\)".*$$/\1/; p }' $(VDRDIR)/config.h)
### The name of the distribution archive:
diff --git a/PLUGINS/src/svdrpdemo/Makefile b/PLUGINS/src/svdrpdemo/Makefile
index 27258748..d9fd8349 100644
--- a/PLUGINS/src/svdrpdemo/Makefile
+++ b/PLUGINS/src/svdrpdemo/Makefile
@@ -1,7 +1,7 @@
#
# Makefile for a Video Disk Recorder plugin
#
-# $Id: Makefile 1.4 2006/04/16 09:04:13 kls Exp $
+# $Id: Makefile 1.5 2006/04/22 10:00:32 kls Exp $
# The official name of this plugin.
# This name will be used in the '-P...' option of VDR to load the plugin.
@@ -30,7 +30,7 @@ TMPDIR = /tmp
### The version number of VDR's plugin API (taken from VDR's "config.h"):
-APIVERSION = $(shell grep 'define APIVERSION ' $(VDRDIR)/config.h | awk '{ print $$3 }' | sed -e 's/"//g')
+APIVERSION = $(shell sed -ne '/define APIVERSION/ { s/^.*"\(.*\)".*$$/\1/; p }' $(VDRDIR)/config.h)
### The name of the distribution archive:
diff --git a/newplugin b/newplugin
index 2a7cac2a..f54db76e 100755
--- a/newplugin
+++ b/newplugin
@@ -12,7 +12,7 @@
# See the main source file 'vdr.c' for copyright information and
# how to reach the author.
#
-# $Id: newplugin 1.26 2006/04/17 09:49:13 kls Exp $
+# $Id: newplugin 1.27 2006/04/22 10:04:10 kls Exp $
$PLUGIN_NAME = $ARGV[0] || die "Usage: newplugin <name>\n";
@@ -85,7 +85,7 @@ TMPDIR = /tmp
### The version number of VDR's plugin API (taken from VDR's "config.h"):
-APIVERSION = \$(shell grep 'define APIVERSION ' \$(VDRDIR)/config.h | awk '{ print \$\$3 }' | sed -e 's/"//g')
+APIVERSION = \$(shell sed -ne '/define VDRVERSION/ { s/^.*"\(.*\)".*\$\$/\\1/; p }' \$(VDRDIR)/config.h)
### The name of the distribution archive: