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"
|
2018-02-17 02:03:39 +01:00
|
|
|
local DEVDEPLOYDIR="$PKGDEVDEPLOYDIR/$PKGNAME"
|
2018-02-15 23:47:54 +01:00
|
|
|
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-02-17 02:03:39 +01:00
|
|
|
mkdir -p "$PKGBUILDDIR" "$DEPLOYDIR" "$DEVDEPLOYDIR"
|
2017-12-09 21:51:48 +01:00
|
|
|
|
2018-02-16 18:45:25 +01:00
|
|
|
pushd "$PKGBUILDDIR" > /dev/null
|
2018-02-17 02:03:39 +01:00
|
|
|
$FUNCTION "$SRC" "$DEPLOYDIR" "$DEVDEPLOYDIR" &>> "$LOGFILE" < /dev/null
|
2017-12-09 21:51:48 +01:00
|
|
|
popd > /dev/null
|
|
|
|
|
|
|
|
(rmdir "$DEPLOYDIR" || true) 2> /dev/null ;
|
2018-02-17 02:03:39 +01:00
|
|
|
(rmdir "$DEVDEPLOYDIR" || true) 2> /dev/null ;
|
2017-12-09 21:51:48 +01:00
|
|
|
}
|