You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
fping/ci/test-tarball.sh

32 lines
556 B
Bash

11 years ago
#!/bin/bash
# make sure that the .tar.gz file contains everything necessary
# to build fping
set -e
set -x
# skip on macos
if [[ "$OSTYPE" == "darwin"* ]]; then
exit 0
fi
11 years ago
make dist
VERSION=$(ls fping-*.tar.gz | sed -e 's/^fping-//' | sed -e 's/\.tar\.gz$//')
if [ -z "$VERSION" ]; then
11 years ago
echo "tar.gz file not found." >&2
exit 1
fi
# unarchive
11 years ago
TMPDIR=$(mktemp -d --tmpdir=ci)
11 years ago
cd $TMPDIR
11 years ago
tar xf ../../fping-$VERSION.tar.gz
11 years ago
DIRNAME=$(ls)
# build
cd $DIRNAME
11 years ago
./configure --enable-ipv4 --enable-ipv6 --prefix=/opt/fping
11 years ago
make
11 years ago
sudo make install