mirror of
https://github.com/pygos/build.git
synced 2024-11-25 20:30:43 +01:00
b36d66bb9b
- Only one checkfile per package, not per stage - Have to rebuild entire package on failure anyway - Faster build since we can simply guard toolchain restore with checkfile test Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
18 lines
526 B
Bash
18 lines
526 B
Bash
run_pkg_command() {
|
|
local FUNCTION="$1"
|
|
local DEPLOYDIR="$PKGDEPLOYDIR/$PKGNAME"
|
|
local DEVDEPLOYDIR="$PKGDEVDEPLOYDIR/$PKGNAME"
|
|
local LOGFILE="$PKGLOGDIR/${PKGNAME}-${FUNCTION}.log"
|
|
local SRC="$PKGSRCDIR/$SRCDIR"
|
|
|
|
echo "$PKGNAME - $FUNCTION"
|
|
|
|
mkdir -p "$PKGBUILDDIR" "$DEPLOYDIR" "$DEVDEPLOYDIR"
|
|
|
|
pushd "$PKGBUILDDIR" > /dev/null
|
|
$FUNCTION "$SRC" "$DEPLOYDIR" "$DEVDEPLOYDIR" &>> "$LOGFILE" < /dev/null
|
|
popd > /dev/null
|
|
|
|
(rmdir "$DEPLOYDIR" || true) 2> /dev/null ;
|
|
(rmdir "$DEVDEPLOYDIR" || true) 2> /dev/null ;
|
|
}
|