[Pkg-javascript-commits] [node-shell-quote] 129/137: Build examples

Bastien Roucariès rouca at moszumanska.debian.org
Fri Aug 25 19:19:46 UTC 2017


This is an automated email from the git hooks/post-receive script.

rouca pushed a commit to branch master
in repository node-shell-quote.

commit e5b5c735c3fba009f26d244e43a1818331486f14
Author: Bastien ROUCARIÈS <roucaries.bastien at gmail.com>
Date:   Mon Aug 21 14:29:03 2017 +0200

    Build examples
---
 debian/examples |  1 +
 debian/rules    | 12 ++++++++++++
 2 files changed, 13 insertions(+)

diff --git a/debian/examples b/debian/examples
new file mode 100644
index 0000000..700b101
--- /dev/null
+++ b/debian/examples
@@ -0,0 +1 @@
+example/*.js
diff --git a/debian/rules b/debian/rules
index 12ae395..10c0b1e 100755
--- a/debian/rules
+++ b/debian/rules
@@ -18,3 +18,15 @@ else
 	@echo 'Skip test suite                                           '
 	@echo '**********************************************************'
 endif
+
+override_dh_installexamples:
+ifeq (,$(filter nodoc,$(DEB_BUILD_OPTIONS) $(DEB_BUILD_PROFILES)))
+	dh_installexamples
+        # patch example
+	find $(CURDIR)/debian/node-shell-quote/usr/share/doc/node-shell-quote/examples/ -name '*.js' -exec \
+                sed -i "s,require\s*[(]\s*'[.][.][^']*'\s*[)],require('shell-quote'),g" {} \;
+else
+	@echo '**********************************************************'
+	@echo 'Skip example                                              '
+	@echo '**********************************************************'
+endif

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-shell-quote.git



More information about the Pkg-javascript-commits mailing list