laforge submitted this change.

View Change

Approvals: laforge: Looks good to me, approved Jenkins Builder: Verified osmith: Looks good to me, but someone else must approve
contrib/generate_build_dep.sh: pass '-n' to mv

It may happen that the same directory is present in both
`_build/default/lib` and `_build/default/plugins` directories.
In this case the `mv` command will fail, and this is exactly
what happens when adding a new dependency in a follow-up patch:

mv: cannot move './_build/default/plugins/ncalendar' to '_checkouts/ncalendar': Directory not empty
mv: cannot move './_build/default/plugins/ndto' to '_checkouts/ndto': Directory not empty
mv: cannot move './_build/default/plugins/njson' to '_checkouts/njson': Directory not empty

Pass `-n` to skip already existing checkouts.

Change-Id: I9a95afcac54dec9684f34224a912574bb387e96c
---
M contrib/generate_build_dep.sh
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/contrib/generate_build_dep.sh b/contrib/generate_build_dep.sh
index 08efac9..dd94d4c 100755
--- a/contrib/generate_build_dep.sh
+++ b/contrib/generate_build_dep.sh
@@ -13,9 +13,9 @@
REBAR_PROFILE=default rebar3 get-deps
REBAR_PROFILE=test rebar3 get-deps
mkdir _checkouts
-mv ./_build/default/lib/* _checkouts/
-mv ./_build/default/plugins/* _checkouts/
-mv ./_build/test/lib/meck _checkouts/
+mv -n ./_build/default/lib/* _checkouts/
+mv -n ./_build/default/plugins/* _checkouts/
+mv -n ./_build/test/lib/meck _checkouts/
# delete erlang bytecode
find _checkouts/ -iname '*beam' -delete
tar czf build_dep.tar.gz ./_checkouts

To view, visit change 41109. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-MessageType: merged
Gerrit-Project: erlang/osmo-s1gw
Gerrit-Branch: master
Gerrit-Change-Id: I9a95afcac54dec9684f34224a912574bb387e96c
Gerrit-Change-Number: 41109
Gerrit-PatchSet: 3
Gerrit-Owner: fixeria <vyanitskiy@sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge@osmocom.org>
Gerrit-Reviewer: osmith <osmith@sysmocom.de>