summaryrefslogtreecommitdiff
path: root/libremakepkg
diff options
context:
space:
mode:
authorJoshua Ismael Haase Hernández <hahj87@gmail.com>2011-06-05 22:33:42 -0500
committerJoshua Ismael Haase Hernández <hahj87@gmail.com>2011-06-05 22:33:42 -0500
commit6749a07b4c114613f94aa915f603f00d26c16e0c (patch)
treeee966c2b66ea5a96dcebc3063983e43212cddf9b /libremakepkg
parent909d1edd02022f2f8a8fbdb0161181ce0daada08 (diff)
* libremakepkg copy log if failed.
* FULLBUILDCMD use 'no color' option for makepkg
Diffstat (limited to 'libremakepkg')
-rwxr-xr-xlibremakepkg10
1 files changed, 9 insertions, 1 deletions
diff --git a/libremakepkg b/libremakepkg
index b0e1371..e83bee7 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