btrfs-progs: Use more loose open ctree flags for dump-tree and restore
[platform/upstream/btrfs-progs.git] / travis / build-dep-zstd
1 #!/bin/sh
2 # download, build and install the zstd library
3
4 version=1.3.3
5 dir=tmp-cached-zstd
6 stamp="$dir/.last-build-zstd"
7 here=`pwd`
8
9 set -e
10
11 if [ -d "$dir" -a -f "$stamp" ]; then
12         echo "Using valid cache for $dir, built" `cat "$stamp"`
13         cd "$dir"
14         cd zstd-${version}
15         sudo make install PREFIX=/usr
16         exit 0
17 fi
18
19 echo "No or stale cache for $dir, rebuilding"
20 rm -rf "$dir"
21 mkdir "$dir"
22 cd "$dir"
23 wget https://github.com/facebook/zstd/archive/v${version}.tar.gz
24 tar xf v${version}.tar.gz
25 cd zstd-${version}
26 make
27 sudo make install PREFIX=/usr
28 date > "$here/$stamp"