summaryrefslogtreecommitdiff
path: root/libremakepkg
diff options
context:
space:
mode:
Diffstat (limited to 'libremakepkg')
-rwxr-xr-xlibremakepkg10
1 files changed, 9 insertions, 1 deletions
diff --git a/libremakepkg b/libremakepkg
index 3cbc844..af18e8e 100755
--- a/libremakepkg
+++ b/libremakepkg
@@ -40,6 +40,7 @@ function usage {
_CLEAN=""
CLEAN_CACHE=""
update_first="n"
+use_log='n'
chrootname=${CHCOPY}
_PKGINSTALL=""
_MAKEPKG_ARGS=""
@@ -56,6 +57,8 @@ while getopts ${libremakepkgargs} arg ; do
n) chrootname="$OPTARG"; echo $chrootname ;;
I) _PKGINSTALL+="-I $OPTARG " ;;
M) _MAKEPKG_ARGS+=" $OPTARG" ;;
+ L) _MAKEPKG_ARGS+=" -$arg $OPTARG"
+ use_log='y';;
*) _MAKEPKG_ARGS+=" -$arg $OPTARG" ;;
esac
done
@@ -84,4 +87,9 @@ fi
msg "Creating the package"
makechrootpkg $_CLEAN -r ${CHROOTDIR} -l "${chrootname}" $_PKGINSTALL -- $_MAKEPKG_ARGS
-exit $?
+ev=$? # exit value
+
+[ $ev -ne 0 -a "$use_log" == 'y' ] && {
+ cp ${CHROOTDIR}/${chrootname}/build/*.log ./
+}
+exit $ev