From cd0bcd3c6b7c134f9039c6e91a76405f69b43a95 Mon Sep 17 00:00:00 2001 From: Vincent Batts Date: Thu, 26 Sep 2019 15:50:55 -0400 Subject: [PATCH] BuildSourceImage: naive relative symlink path Fixes #44 This does not account for the `${artifact_path}` potentially being nested. Signed-off-by: Vincent Batts --- BuildSourceImage.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/BuildSourceImage.sh b/BuildSourceImage.sh index d0db1ca..7b9ad34 100755 --- a/BuildSourceImage.sh +++ b/BuildSourceImage.sh @@ -641,11 +641,11 @@ layout_insert_bash() { if [ "$(basename "${tar_path}")" == "$(basename "${artifact_path}")" ] ; then _mkdir_p "${tmpdir}/$(dirname "${tar_path}")" # TODO this symlink need to be relative path, not to `/blobs/...` - ln -s "/blobs/sha256/${sum}" "${tmpdir}/${tar_path}" + ln -s "../blobs/sha256/${sum}" "${tmpdir}/${tar_path}" else _mkdir_p "${tmpdir}/${tar_path}" # TODO this symlink need to be relative path, not to `/blobs/...` - ln -s "/blobs/sha256/${sum}" "${tmpdir}/${tar_path}/$(basename "${artifact_path}")" + ln -s "../blobs/sha256/${sum}" "${tmpdir}/${tar_path}/$(basename "${artifact_path}")" fi tmptar="$(_mktemp)"