2018-01-25 00:09:29 +01:00
|
|
|
run_pkg_command() {
|
2018-01-24 21:48:10 +01:00
|
|
|
local FUNCTION="$1"
|
2018-02-15 23:47:54 +01:00
|
|
|
local DEPLOYDIR="$PKGDEPLOYDIR/$PKGNAME"
|
|
|
|
local LOGFILE="$PKGLOGDIR/${PKGNAME}-${FUNCTION}.log"
|
2017-12-09 21:51:48 +01:00
|
|
|
local SRC="$PKGSRCDIR/$SRCDIR"
|
|
|
|
|
2018-02-18 17:46:06 +01:00
|
|
|
echo "$PKGNAME - $FUNCTION"
|
|
|
|
|
2018-06-17 13:28:18 +02:00
|
|
|
mkdir -p "$PKGBUILDDIR" "$DEPLOYDIR"
|
2017-12-09 21:51:48 +01:00
|
|
|
|
2018-02-16 18:45:25 +01:00
|
|
|
pushd "$PKGBUILDDIR" > /dev/null
|
2018-06-17 13:28:18 +02:00
|
|
|
$FUNCTION "$SRC" "$DEPLOYDIR" &>> "$LOGFILE" < /dev/null
|
2017-12-09 21:51:48 +01:00
|
|
|
popd > /dev/null
|
|
|
|
|
|
|
|
(rmdir "$DEPLOYDIR" || true) 2> /dev/null ;
|
|
|
|
}
|