aboutsummaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorEneas U de Queiroz <cotequeiroz@gmail.com>2022-10-06 10:02:59 -0300
committerDaniel Golle <daniel@makrotopia.org>2022-10-06 23:33:10 +0100
commit2e75ccbb7d7d620d3ba101927f04732a1455b5af (patch)
tree315f6656e57608c710e92b96d624d92c4f12f482 /net
parentfb91f8b7b07e36b4f47f1808badedf7ba3937d3a (diff)
gnunnet: halt build if any command fails
There are many places in the packages' install recipes whith multiple commands being executed in the same shell invocation, separated with a semicolon (;). The return status will depend only on the last command being run. The same thing happens in loops, where only the last file will determine the result of the command. Change the ';' to '&&', and exit the loop if any operation fails. Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
Diffstat (limited to 'net')
-rw-r--r--net/gnunet/Makefile32
1 files changed, 16 insertions, 16 deletions
diff --git a/net/gnunet/Makefile b/net/gnunet/Makefile
index 3c9187179..59c406237 100644
--- a/net/gnunet/Makefile
+++ b/net/gnunet/Makefile
@@ -97,42 +97,42 @@ define BuildComponent
define Package/gnunet-$(1)/install
( if [ "$(BIN_$(1))" ]; then \
- $(INSTALL_DIR) $$(1)/usr/bin ; \
+ $(INSTALL_DIR) $$(1)/usr/bin && \
for bin in $(BIN_$(1)); do \
- $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/gnunet-$$$$$$$$bin $$(1)/usr/bin/ ; \
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/gnunet-$$$$$$$$bin $$(1)/usr/bin/ || exit 1; \
done \
fi )
( if [ "$(LIB_$(1))" ]; then \
- $(INSTALL_DIR) $$(1)/usr/lib ; \
+ $(INSTALL_DIR) $$(1)/usr/lib && \
for lib in $(LIB_$(1)); do \
- $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgnunet$$$$$$$$lib.so* $$(1)/usr/lib/ ; \
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgnunet$$$$$$$$lib.so* $$(1)/usr/lib/ || exit 1; \
done \
fi )
( if [ "$(PLUGIN_$(1))" ]; then \
- $(INSTALL_DIR) $$(1)/usr/lib/gnunet ; \
+ $(INSTALL_DIR) $$(1)/usr/lib/gnunet && \
for plug in $(PLUGIN_$(1)); do \
- $(CP) $(PKG_INSTALL_DIR)/usr/lib/gnunet/libgnunet_plugin_$$$$$$$$plug*.so $$(1)/usr/lib/gnunet ; \
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/gnunet/libgnunet_plugin_$$$$$$$$plug*.so $$(1)/usr/lib/gnunet || exit 1; \
done \
fi )
( if [ "$(LIBEXEC_$(1))" ]; then \
- $(INSTALL_DIR) $$(1)/usr/lib/gnunet/libexec ; \
+ $(INSTALL_DIR) $$(1)/usr/lib/gnunet/libexec && \
for lex in $(LIBEXEC_$(1)); do \
- $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/gnunet/libexec/gnunet-$$$$$$$$lex $$(1)/usr/lib/gnunet/libexec ; \
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/gnunet/libexec/gnunet-$$$$$$$$lex $$(1)/usr/lib/gnunet/libexec || exit 1; \
done \
fi )
( if [ "$(CONF_$(1))" ]; then \
- $(INSTALL_DIR) $$(1)/usr/share/gnunet/config.d ; \
+ $(INSTALL_DIR) $$(1)/usr/share/gnunet/config.d && \
for conf in $(CONF_$(1)); do \
- $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/gnunet/config.d/$$$$$$$$conf.conf $$(1)/usr/share/gnunet/config.d ; \
+ $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/gnunet/config.d/$$$$$$$$conf.conf $$(1)/usr/share/gnunet/config.d || exit 1; \
done \
fi )
( if [ -e ./files/gnunet-$(1).defaults ]; then \
- $(INSTALL_DIR) $$(1)/etc/uci-defaults ; \
+ $(INSTALL_DIR) $$(1)/etc/uci-defaults && \
$(INSTALL_BIN) ./files/gnunet-$(1).defaults $$(1)/etc/uci-defaults/gnunet-$(1) ; \
fi )
endef
@@ -146,7 +146,7 @@ define Package/gnunet/install
( for bin in arm ats cadet core config ecc identity nat nat-auto nat-server nse \
peerinfo peerstore revocation scalarproduct scrypt statistics transport uri; do \
- $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/gnunet-$$$$bin $(1)/usr/bin/ ; \
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/gnunet-$$$$bin $(1)/usr/bin/ || exit 1; \
done )
( for lib in arm ats block blockgroup cadet \
@@ -154,11 +154,11 @@ define Package/gnunet/install
identity natauto natnew nse nt peerinfo peerstore regexblock regex revocation \
scalarproduct set seti setu statistics transport transportapplication \
transportcommunicator transportcore transportmonitor util; do \
- $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgnunet$$$$lib.so* $(1)/usr/lib/ ; \
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgnunet$$$$lib.so* $(1)/usr/lib/ || exit 1; \
done )
( for plug in ats_proportional block_dht block_regex block_revocation dhtu_gnunet dhtu_ip transport_unix; do \
- $(CP) $(PKG_INSTALL_DIR)/usr/lib/gnunet/libgnunet_plugin_$$$$plug*.so $(1)/usr/lib/gnunet ; \
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/gnunet/libgnunet_plugin_$$$$plug*.so $(1)/usr/lib/gnunet || exit 1; \
done )
( for lex in communicator-unix daemon-topology helper-nat-client \
@@ -168,13 +168,13 @@ define Package/gnunet/install
service-scalarproduct-alice service-scalarproduct-bob service-scalarproduct-ecc-alice \
service-scalarproduct-ecc-bob service-set service-seti service-setu service-statistics \
service-tng service-transport timeout; do \
- $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/gnunet/libexec/gnunet-$$$$lex $(1)/usr/lib/gnunet/libexec ; \
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/gnunet/libexec/gnunet-$$$$lex $(1)/usr/lib/gnunet/libexec || exit 1; \
done )
( for conf in arm ats cadet communicator-unix core datacache dht dhtu identity \
nat nat-auto nse peerinfo peerstore regex revocation \
scalarproduct set seti setu statistics tlds topology transport util; do \
- $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/gnunet/config.d/$$$$conf.conf $(1)/usr/share/gnunet/config.d ; \
+ $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/gnunet/config.d/$$$$conf.conf $(1)/usr/share/gnunet/config.d || exit 1; \
done )
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/gnunet/hellos/* $(1)/usr/share/gnunet/hellos