From c4bf9e6d6e4f890b431cf50c91a58970c38e666c Mon Sep 17 00:00:00 2001 From: Anton Lundin Date: Mon, 18 Jun 2018 22:23:12 +0200 Subject: build-system: Don't fail if tarball is there but no dir The previous code assumed everything was good to go if just the tar ball was there, but if it wasn't unpacked, it all went sideways. This makes it more robust and to actually handle that the tarball might just be there. Signed-off-by: Anton Lundin --- scripts/get-dep-lib.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/get-dep-lib.sh b/scripts/get-dep-lib.sh index bc76204f8..3fbfcd3c1 100755 --- a/scripts/get-dep-lib.sh +++ b/scripts/get-dep-lib.sh @@ -67,6 +67,9 @@ curl_download_library() { if [ ! -f "$filename" ]; then ${CURL} "${base_url}${filename}" + fi + + if [ ! -d "$name" ] || [ "$name" -ot "$filename" ] ; then rm -rf "$name" mkdir "$name" tar -C "$name" --strip-components=1 -xf "$filename" -- cgit v1.2.3-70-g09d2