btrfs-progs: check: enhanced progress indicator
[btrfs-progs-unstable/devel.git] / travis / build-dep-zstd
blobeae0be632ad0177a0d00efd2447ec9501254fd54
1 #!/bin/sh
2 # download, build and install the zstd library
4 version=1.3.3
5 dir=tmp-cached-zstd
6 stamp="$dir/.last-build-zstd"
7 here=`pwd`
9 set -e
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
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"