29 lines
667 B
Bash
Executable File
29 lines
667 B
Bash
Executable File
#!/bin/sh
|
|
# usage: $0 [branch name] [configure parameters]
|
|
|
|
urlbase="https://github.com/kdave/btrfs-progs/archive"
|
|
branch=${1:-devel}
|
|
fnbase="${branch/\//-}"
|
|
fname="${fnbase}.tar.gz"
|
|
url="${urlbase}/${branch}.tar.gz"
|
|
|
|
shift
|
|
|
|
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
|
|
|
|
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
|
|
echo "Missing or empty tar, downloading branch $branch from git"
|
|
rm -- "$fname"
|
|
wget "$url" -O "$fname"
|
|
fi
|
|
tar xf "$fname"
|
|
cd "btrfs-progs-$fnbase"
|
|
ci/build-default "$@"
|