diff options
-rwxr-xr-x | fullpkg | 23 | ||||
-rwxr-xr-x | libremakepkg | 10 | ||||
-rw-r--r-- | libretools.conf | 6 |
3 files changed, 23 insertions, 16 deletions
@@ -281,9 +281,8 @@ function _pkg_build () { } pkgs=$(cat $build_dir/log | tr " " "\n" | grep "built:") && { - error "Those packages were built and installed:" + msg "Those packages were built and installed:" echo ${pkgs[@]} | tr " " "\n" | cut -d: -f2 - msg "Uploading packages to the server" } pkgs=$(cat $build_dir/log | tr " " "\n" | grep "failed:") && { @@ -298,7 +297,7 @@ function _pkg_build () { popd > /dev/null } -## END FUNCTIONS ## +###### END FUNCTIONS ###### force_build="" level=0 @@ -325,10 +324,19 @@ while getopts 'ha:bcCd:l:nm:r:' arg; do esac done +[ ! -r PKGBUILD ] && { + error "This isn't a build directory" + usage && exit 1 +} + +## if $level = 20 there is highly likely there are circular deps +[ $level -eq $max_level -o $level -gt $max_level ] && exit 20 + # Only on level 0 [ $level -eq 0 ] && { # if build_dir exist use it, else make a build_dir build_dir=${build_dir:-$(mktemp -d /tmp/fullpkg.XXXXXX)} + mkdir -p $build_dir # cleanup if the option was used. [ $do_cleanup == 'y' ] && { @@ -363,15 +371,6 @@ done msg "Checking dependencies" } -[ ! -r PKGBUILD ] && { - error "This isn't a build directory" - usage && exit 1 -} - -## if $level = 20 there is highly likely there are circular deps -[ $level -eq $max_level -o $level -gt $max_level ] && exit 20 - - find_deps || { # if find_deps finds circular deps # it should exit with status 20 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 diff --git a/libretools.conf b/libretools.conf index c4ac606..a8ff581 100644 --- a/libretools.conf +++ b/libretools.conf @@ -42,7 +42,7 @@ LIBREDESTDIR=/home/parabolavnx/parabolagnulinux.org/repo LIBRESRCDIR=/home/parabolavnx/parabolagnulinux.org/repo/pkgbuilds ## ABSLibre -ABSLIBREGIT=http://projects.parabolagnulinux.org/abslibre.git/ +ABSLIBREGIT=http://projects.parabolagnulinux.org/abslibre.git ## Commit Command ## Should be git or hg @@ -52,8 +52,8 @@ ABSLIBREGIT=http://projects.parabolagnulinux.org/abslibre.git/ ## Build cmd for fullpkg-ng ## Uncomment one of those or make one of your choice -#FULLBUILDCMD="sudo libremakepkg -siL -M --noconfirm -M --nocheck" -#FULLBUILDCMD="makepkg --noconfirm --nocheck -sciL" +#FULLBUILDCMD="sudo libremakepkg -simL -M --noconfirm -M --nocheck" +#FULLBUILDCMD="makepkg --noconfirm --nocheck -scimL" #FULLBUILDCMD="here is a place for cross-compiling build cmd" # Checks if vars aren't empty |