mirror of https://github.com/trapexit/mergerfs.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
63 lines
1.2 KiB
63 lines
1.2 KiB
#!/bin/sh
|
|
set -e
|
|
|
|
if [ $# -ne 2 ]; then
|
|
echo "usage: $0 <branch> <git_repo>"
|
|
echo "argv: $@"
|
|
echo "argc: $#"
|
|
exit 1
|
|
fi
|
|
|
|
GIT_REPO="${1}"
|
|
BRANCH="${2}"
|
|
BUILDDIR="/tmp/build"
|
|
|
|
echo "Clone source from ${GIT_REPO} to ${BUILDDIR}"
|
|
git \
|
|
clone \
|
|
--single-branch \
|
|
--branch="${BRANCH}" \
|
|
"${GIT_REPO}" \
|
|
"${BUILDDIR}"
|
|
|
|
cd "${BUILDDIR}"
|
|
|
|
git log HEAD^1..
|
|
|
|
mkdir "/build"
|
|
if [ -e /usr/bin/apt-get ]; then
|
|
make deb
|
|
find /tmp/ \
|
|
-type f \
|
|
-name "*.deb" \
|
|
-not -name "*dbgsym*" \
|
|
-exec cp -v {} /build/ \;
|
|
exit 0
|
|
elif [ -e /usr/bin/dnf ]; then
|
|
make rpm
|
|
find /tmp/ \
|
|
-type f \
|
|
-name "*.rpm" \
|
|
-not -name "*sym*" \
|
|
-not -name "*src.rpm" \
|
|
-exec cp -v {} /build/ \;
|
|
exit 0
|
|
elif [ -e /usr/bin/yum ]; then
|
|
. /opt/rh/devtoolset-9/enable
|
|
make rpm
|
|
find /tmp/ \
|
|
-type f \
|
|
-name "*.rpm" \
|
|
-not -name "*sym*" \
|
|
-not -name "*src.rpm" \
|
|
-exec cp -v {} /build/ \;
|
|
exit 0
|
|
elif [ -e /sbin/apk ]; then
|
|
echo "NOT YET SUPPORTED"
|
|
elif [ -e /usr/sbin/pkg ]; then
|
|
echo "NOT YET SUPPORTED"
|
|
else
|
|
echo "NOT YET SUPPORTED"
|
|
fi
|
|
|
|
exit 1
|