mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
5f4006ae4f
commit
c4bf9e6d6e
1 changed files with 3 additions and 0 deletions
|
@ -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"
|
||||
|
|
Loading…
Add table
Reference in a new issue