FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > ArchLinux > ArchLinux Pacman Development

 
 
LinkBack Thread Tools
 
Old 04-12-2012, 02:54 PM
Dave Reisner
 
Default validate shell scripts with $(BASH_SHELL) on build

Pass $(OURSCRIPTS) through the bash parser in read only mode to validate
syntax. Note that this doesn't actually catch all errors, but it might
be useful for developers working on these scripts.

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
---
contrib/Makefile.am | 1 +
scripts/Makefile.am | 1 +
2 files changed, 2 insertions(+)

diff --git a/contrib/Makefile.am b/contrib/Makefile.am
index eca39e7..2953912 100644
--- a/contrib/Makefile.am
+++ b/contrib/Makefile.am
@@ -55,6 +55,7 @@ $(OURSCRIPTS): Makefile
$(AM_V_GEN)$(edit) $(srcdir)/$@.in >$@.tmp
$(AM_V_at)chmod +x,a-w $@.tmp
$(AM_V_at)mv $@.tmp $@
+ @$(BASH_SHELL) -O extglob -n $@

$(OURFILES): Makefile
$(AM_V_at)$(RM) $@ $@.tmp
diff --git a/scripts/Makefile.am b/scripts/Makefile.am
index b8a1990..dbe61b8 100644
--- a/scripts/Makefile.am
+++ b/scripts/Makefile.am
@@ -63,6 +63,7 @@ edit = sed
$(OURSCRIPTS): Makefile
$(AM_V_at)$(RM) $@
$(AM_V_GEN)test -f $(srcdir)/$@.sh.in && m4 -P -I $(srcdir) $(srcdir)/$@.sh.in | $(edit) >$@
+ @$(BASH_SHELL) -O extglob -n $@
$(AM_V_at)chmod +x,a-w $@

makepkg:
--
1.7.10
 

Thread Tools




All times are GMT. The time now is 08:18 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org