mirror of
https://github.com/moparisthebest/pacman
synced 2024-11-15 22:05:02 -05:00
validate bash scripts with 'bash -n' during build.
Use the no-exec mode of $(BASH_SHELL) to check for syntax errors in shell scripts. Since we use the extglob feature in various places, this requires that we pass -O extglob to the shell as well, to ensure that the parser is armed to handle this syntax. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
This commit is contained in:
parent
1b494ab771
commit
03acea832a
@ -66,6 +66,7 @@ $(BASHSCRIPTS): Makefile
|
|||||||
$(AM_V_at)$(RM) $@
|
$(AM_V_at)$(RM) $@
|
||||||
$(AM_V_GEN)test -f $(srcdir)/$@.sh.in && m4 -P -I $(srcdir) $(srcdir)/$@.sh.in | $(edit) >$@
|
$(AM_V_GEN)test -f $(srcdir)/$@.sh.in && m4 -P -I $(srcdir) $(srcdir)/$@.sh.in | $(edit) >$@
|
||||||
$(AM_V_at)chmod +x,a-w $@
|
$(AM_V_at)chmod +x,a-w $@
|
||||||
|
@$(BASH_SHELL) -O extglob -n $@
|
||||||
|
|
||||||
$(OURFILES): Makefile
|
$(OURFILES): Makefile
|
||||||
$(AM_V_at)$(RM) $@ $@.tmp
|
$(AM_V_at)$(RM) $@ $@.tmp
|
||||||
|
@ -64,6 +64,7 @@ $(OURSCRIPTS): Makefile
|
|||||||
$(AM_V_at)$(RM) $@
|
$(AM_V_at)$(RM) $@
|
||||||
$(AM_V_GEN)test -f $(srcdir)/$@.sh.in && m4 -P -I $(srcdir) $(srcdir)/$@.sh.in | $(edit) >$@
|
$(AM_V_GEN)test -f $(srcdir)/$@.sh.in && m4 -P -I $(srcdir) $(srcdir)/$@.sh.in | $(edit) >$@
|
||||||
$(AM_V_at)chmod +x,a-w $@
|
$(AM_V_at)chmod +x,a-w $@
|
||||||
|
@$(BASH_SHELL) -O extglob -n $@
|
||||||
|
|
||||||
makepkg: \
|
makepkg: \
|
||||||
$(srcdir)/makepkg.sh.in \
|
$(srcdir)/makepkg.sh.in \
|
||||||
|
Loading…
Reference in New Issue
Block a user