Skip to content

Commit 3d87946

Browse files
authored
fix build:fetch selected binaries (#3447)
1 parent d865e65 commit 3d87946

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

Makefile

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -292,19 +292,21 @@ docker-metrics-test: ## Run metrics helper unit test suite in a container.
292292
plugins: FETCH_VERSION=1.7.1
293293
plugins: FETCH_URL=https://github.com/containernetworking/plugins/archive/refs/tags/v$(FETCH_VERSION).tar.gz
294294
plugins: VISIT_URL=https://github.com/containernetworking/plugins/tree/v$(FETCH_VERSION)/plugins/
295-
plugins: CORE_PLUGINS=bandwidth,host-local,loopback,portmap,sbr
295+
plugins: CORE_PLUGINS = bandwidth host-local loopback portmap sbr
296296
plugins: ## Fetch the CNI plugins
297297
@echo "Fetching Container networking plugins v$(FETCH_VERSION) from upstream release"
298298
@echo
299299
@echo "Visit upstream project for plugin details:"
300300
@echo "$(VISIT_URL)"
301301
@echo
302-
mkdir -p ${CORE_PLUGIN_DIR} ${CORE_PLUGIN_TMP}
303-
curl -s -L $(FETCH_URL) | tar xzf - -C ${CORE_PLUGIN_TMP}
304-
cd ${CORE_PLUGIN_TMP}/plugins-${FETCH_VERSION} && ./build_linux.sh
305-
cp -a ${CORE_PLUGIN_TMP}/plugins-${FETCH_VERSION}/LICENSE ${CORE_PLUGIN_DIR}
306-
cp -a ${CORE_PLUGIN_TMP}/plugins-${FETCH_VERSION}/bin/{$(CORE_PLUGINS)} ${CORE_PLUGIN_DIR}
307-
rm -rf ${CORE_PLUGIN_TMP}
302+
mkdir -p $(CORE_PLUGIN_DIR) $(CORE_PLUGIN_TMP)
303+
curl -s -L $(FETCH_URL) | tar xzf - -C $(CORE_PLUGIN_TMP)
304+
cd $(CORE_PLUGIN_TMP)/plugins-$(FETCH_VERSION) && ./build_linux.sh
305+
cp -a $(CORE_PLUGIN_TMP)/plugins-$(FETCH_VERSION)/LICENSE $(CORE_PLUGIN_DIR)
306+
for PLUGIN in $(CORE_PLUGINS); do \
307+
cp -a $(CORE_PLUGIN_TMP)/plugins-$(FETCH_VERSION)/bin/$$PLUGIN $(CORE_PLUGIN_DIR); \
308+
done
309+
rm -rf $(CORE_PLUGIN_TMP)
308310

309311
##@ Debug script
310312

0 commit comments

Comments
 (0)