summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Anton Lundin <glance@acc.umu.se>2018-06-18 22:23:12 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2018-06-22 02:47:58 -0700
commitc4bf9e6d6e4f890b431cf50c91a58970c38e666c (patch)
tree150e7a28c4bd20997f2b825aae4b570c61b30fd9
parent5f4006ae4f875cc6bdbc505de7816e7dce2eade0 (diff)
downloadsubsurface-c4bf9e6d6e4f890b431cf50c91a58970c38e666c.tar.gz
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 <glance@acc.umu.se>
-rwxr-xr-xscripts/get-dep-lib.sh3
1 files changed, 3 insertions, 0 deletions
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"