diff options
author | arehbein <arehbein@sysmocom.de> | 2023-05-07 21:52:36 +0200 |
---|---|---|
committer | arehbein <arehbein@sysmocom.de> | 2023-09-26 23:27:16 +0200 |
commit | b54d3eff26af1c37262bb0b64b2f960813d02ff1 (patch) | |
tree | c21a62196c7cbb85c1425398be04e0029e3da43f | |
parent | d44ea8e393d869bd2b7ce8ebb5fe61044ab4dc3b (diff) |
scripts: Add NOTE to docker-playground_adapt in case of failed TTCN3 compilation
Also link deps-Makefile instead of downloading it
Change-Id: I05d5cb39ec30140d8553863e627ecbc27fbafab2
-rwxr-xr-x | scripts/docker-playground_adapt | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/scripts/docker-playground_adapt b/scripts/docker-playground_adapt index 2090845..e7d7db4 100755 --- a/scripts/docker-playground_adapt +++ b/scripts/docker-playground_adapt @@ -212,13 +212,15 @@ adapt_dockerfile_add() { fi fi if [ -n "$wants" ]; then - rsync -avz --delete "$ADD_REPO_PATH" . >/dev/null - echo "$ADD_REPO_PATH" > "$DST_REPO_SUBDIR/COPY_SRC.txt" + rsync -avz --delete "$ADD_REPO_PATH/" "$DST_REPO_SUBDIR" >/dev/null if [ $? -ne 0 ]; then echo "Error rsyncing" >&2 exit 1 fi + echo "$ADD_REPO_PATH" > "$DST_REPO_SUBDIR/COPY_SRC.txt" echo -e "Source dir: $ADD_REPO_PATH\nSynced: $(date)" > "$DST_REPO_SUBDIR/source_dir.txt" + echo "NOTE: If compilation unexpectedly fails, note that the script running in Docker won't necessarily give accurate error messages/running " + echo "the make command on the host machine might however give better feedback! Try running make clean in $DST_REPO_SUBDIR" fi fi RUN_GIT_CLONE_TTCN3='RUN.*git clone https://gerrit.osmocom.org/osmo-ttcn3-hacks' @@ -239,6 +241,10 @@ adapt_dockerfile_add() { sed -i 's/\(^[\t ]*git\)/: #\1/g' "$DOCKER_PREPARE_SCRIPT" fi + echo "Link deps-Makefile instead of downloading it (maybe not necessary)" + if ! sed -i $'s;ADD\thttps://gerrit.osmocom.org/plugins/gitiles/osmo-ttcn3-hacks/+/refs/heads/master/deps/Makefile?format=TEXT /tmp/deps-Makefile;RUN\tln -s /osmo-ttcn3-hacks/deps/Makefile /tmp/deps-Makefile;g' Dockerfile; then + echo "Error replacing download line for deps-Makefile" >&2 + fi if echo "$SUBDIR_DOCKER" | grep -q '.*-titan'; then return |