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.
|
|
|
#!/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
|
|
|
|
|
|
|
|
make dist
|
|
|
|
VERSION=$(ls fping-*.tar.gz | sed -e 's/^fping-//' | sed -e 's/\.tar\.gz$//')
|
|
|
|
if [ -z "$VERSION" ]; then
|
|
|
|
echo "tar.gz file not found." >&2
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
# unarchive
|
|
|
|
TMPDIR=$(mktemp -d --tmpdir=ci)
|
|
|
|
cd $TMPDIR
|
|
|
|
tar xf ../../fping-$VERSION.tar.gz
|
|
|
|
DIRNAME=$(ls)
|
|
|
|
|
|
|
|
# build
|
|
|
|
cd $DIRNAME
|
|
|
|
./configure --enable-ipv4 --enable-ipv6 --prefix=/opt/fping
|
|
|
|
make
|
|
|
|
sudo make install
|