summaryrefslogtreecommitdiff
path: root/libremakepkg
diff options
context:
space:
mode:
authorNicolas Reynolds <fauno@kiwwwi.com.ar>2011-06-14 15:49:07 -0300
committerNicolas Reynolds <fauno@kiwwwi.com.ar>2011-06-14 15:49:07 -0300
commit90db8b196cf626d6fa0fd698050edb331ceab7e9 (patch)
treeeae103df00261fab132848db5e5799288f509986 /libremakepkg
parent26005b7e07f968e045cf19ae9ede9be6f5f0fad8 (diff)
parent51c9918206763265d2df42050e241f7f12f1b9df (diff)
Merge branch 'master' of ssh://vparabola/srv/git/projects/libretools
Conflicts: fullpkg
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