mirror of
https://github.com/pygos/build.git
synced 2024-11-04 19:27:09 +01:00
1636fc8aac
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
30 lines
733 B
Bash
Executable file
30 lines
733 B
Bash
Executable file
fetch_package() {
|
|
echo "$PKGNAME - download"
|
|
|
|
if [ -z "$TARBALL" ]; then
|
|
return
|
|
fi
|
|
|
|
if [ ! -e "$PKGDOWNLOADDIR/$TARBALL" ]; then
|
|
curl -o "$PKGDOWNLOADDIR/$TARBALL" --silent --show-error \
|
|
-L "$URL/$TARBALL"
|
|
fi
|
|
|
|
pushd "$PKGDOWNLOADDIR" > /dev/null
|
|
echo "$SHA256SUM ${TARBALL}" > "${TARBALL}.sha256"
|
|
sha256sum -c --quiet "${TARBALL}.sha256"
|
|
rm "${TARBALL}.sha256"
|
|
popd > /dev/null
|
|
|
|
if [ ! -e "$PKGSRCDIR/$SRCDIR" ]; then
|
|
local LOGFILE="$PKGLOGDIR/${PKGNAME}-prepare.log"
|
|
|
|
echo "$PKGNAME - unpack"
|
|
tar -C "$PKGSRCDIR" -xf "$PKGDOWNLOADDIR/$TARBALL"
|
|
|
|
pushd "$PKGSRCDIR/$SRCDIR" > /dev/null
|
|
echo "$PKGNAME - prepare"
|
|
prepare "$SCRIPTDIR/pkg/$PKGNAME" &>> "$LOGFILE" < /dev/null
|
|
popd > /dev/null
|
|
fi
|
|
}
|