xbps-src/xbps-src-doextract: if build_style declares do_extract(), use it rather than hooks.

This commit is contained in:
Juan RP 2014-07-12 17:39:23 +02:00
parent 6e4b6cecf0
commit 407a882b1a
1 changed files with 13 additions and 2 deletions

View File

@ -46,8 +46,19 @@ if declare -f do_extract >/dev/null; then
cd $wrksrc
run_func do_extract
else
# Run do-extract hooks
run_pkg_hooks "do-extract"
if [ -n "$build_style" ]; then
if [ ! -r $XBPS_BUILDSTYLEDIR/${build_style}.sh ]; then
msg_error "$pkgver: cannot find build helper $XBPS_BUILDSTYLEDIR/${build_style}.sh!\n"
fi
. $XBPS_BUILDSTYLEDIR/${build_style}.sh
fi
# If the build_style script declares do_extract(), use it rather than hooks.
if declare -f do_extract >/dev/null; then
run_func do_extract
else
# Run do-extract hooks
run_pkg_hooks "do-extract"
fi
fi
touch -f $XBPS_EXTRACT_DONE