diff --git a/Makefile b/Makefile index d9d73402b..7b43bc4ff 100644 --- a/Makefile +++ b/Makefile @@ -114,11 +114,8 @@ endif # for runtime path (i.e.: the second line in $(NIMBLE_DIR)/pkgs/*/*.nimble-link) $(NIMBLE_DIR): | $(NIM_BINARY) mkdir -p $(NIMBLE_DIR)/pkgs - git submodule foreach --quiet '\ - [ `ls -1 *.nimble 2>/dev/null | wc -l ` -gt 0 ] && { \ - mkdir -p $$toplevel/$(NIMBLE_DIR)/pkgs/$${sm_path#*/}-#head;\ - echo -e "$$($(PWD))\n$$($(PWD))" > $$toplevel/$(NIMBLE_DIR)/pkgs/$${sm_path#*/}-#head/$${sm_path#*/}.nimble-link;\ - } || true' + NIMBLE_DIR="$(NIMBLE_DIR)" PWD_CMD="$(PWD)" \ + git submodule foreach --quiet 'bash $(CURDIR)/scripts/create_nimble_link.sh' # symlink nimbus.nims: diff --git a/docker/beacon_node/Dockerfile b/docker/beacon_node/Dockerfile index 124f0deb7..a9132722b 100644 --- a/docker/beacon_node/Dockerfile +++ b/docker/beacon_node/Dockerfile @@ -21,7 +21,7 @@ RUN export GOROOT=/usr/local/go \ && git reset --hard ${GIT_REVISION} \ && make update deps vendor/go/bin/p2pd nat-libs \ && cp vendor/go/bin/p2pd /usr/bin/p2pd \ - && ls vendor/.nimble/pkgs + && cat vendor/.nimble/pkgs/*/* ARG NETWORK ARG NETWORK_TYPE diff --git a/scripts/create_nimble_link.sh b/scripts/create_nimble_link.sh new file mode 100644 index 000000000..96360ea18 --- /dev/null +++ b/scripts/create_nimble_link.sh @@ -0,0 +1,11 @@ +set -u + +if [ `ls -1 *.nimble 2>/dev/null | wc -l ` -gt 0 ]; then + mkdir -p "$toplevel/${NIMBLE_DIR}/pkgs/${sm_path#*/}-#head" + PKG_DIR="$(${PWD_CMD})" + if [ -d src ]; then + PKG_DIR="${PKG_DIR}/src" + fi + echo -e "${PKG_DIR}\n${PKG_DIR}" > "$toplevel/${NIMBLE_DIR}/pkgs/${sm_path#*/}-#head/${sm_path#*/}.nimble-link" +fi +