mirror of
https://github.com/pygos/build.git
synced 2024-11-16 00:17:11 +01:00
3d30afef75
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
16 lines
398 B
Bash
16 lines
398 B
Bash
run_pkg_command() {
|
|
local FUNCTION="$1"
|
|
local DEPLOYDIR="$PKGDEPLOYDIR/$PKGNAME"
|
|
local LOGFILE="$PKGLOGDIR/${PKGNAME}-${FUNCTION}.log"
|
|
local SRC="$PKGSRCDIR/$SRCDIR"
|
|
|
|
echo "$PKGNAME - $FUNCTION"
|
|
|
|
mkdir -p "$PKGBUILDDIR" "$DEPLOYDIR"
|
|
|
|
pushd "$PKGBUILDDIR" > /dev/null
|
|
$FUNCTION "$SRC" "$DEPLOYDIR" &>> "$LOGFILE" < /dev/null
|
|
popd > /dev/null
|
|
|
|
(rmdir "$DEPLOYDIR" || true) 2> /dev/null ;
|
|
}
|