2021-02-24 16:32:12 +00:00
|
|
|
#!/bin/sh
|
|
|
|
# usage: $0 [branch name] [configure parameters]
|
|
|
|
|
|
|
|
urlbase="https://github.com/kdave/btrfs-progs/archive"
|
|
|
|
branch=${1:-devel}
|
2024-01-26 04:54:26 +00:00
|
|
|
fnbase="${branch/\//-}"
|
|
|
|
fname="${fnbase}.tar.gz"
|
|
|
|
url="${urlbase}/${branch}.tar.gz"
|
2021-02-24 16:32:12 +00:00
|
|
|
|
|
|
|
shift
|
|
|
|
|
2023-02-18 16:01:14 +00:00
|
|
|
for i in gcc gcc-nm cc cpp gcc-ar gcc-ranlib lto-dump; do
|
|
|
|
ln -sf /usr/bin/${i}-13 /usr/bin/${i}
|
|
|
|
done
|
|
|
|
gcc --version
|
|
|
|
|
2021-02-24 16:32:12 +00:00
|
|
|
echo "btrfs-progs build test of branch ${branch}"
|
|
|
|
cd /tmp
|
|
|
|
if [ -f "$fname" -a -s "$fname" ]; then
|
|
|
|
echo "Found local file $fname, not downloading"
|
|
|
|
else
|
2024-01-26 04:54:26 +00:00
|
|
|
echo "Missing or empty tar, downloading branch $branch from git"
|
2021-02-24 16:32:12 +00:00
|
|
|
rm -- "$fname"
|
|
|
|
wget "$url" -O "$fname"
|
|
|
|
fi
|
|
|
|
tar xf "$fname"
|
2024-01-26 04:54:26 +00:00
|
|
|
cd "btrfs-progs-$fnbase"
|
2021-02-24 16:32:12 +00:00
|
|
|
ci/build-default "$@"
|