From 5863c70d969c4654e0ea99f7b68876bc4aa5770b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=A1s=20Reynolds?= Date: Mon, 29 Oct 2012 16:34:57 -0300 Subject: Run is_built against pkgnames When pkgbase isn't a valid pkgname, treepkg ended up deciding to build this non-existant package, regardless of packages already built. This commit fixes that by checking is_built against pkgnames instead. --- treepkg | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'treepkg') diff --git a/treepkg b/treepkg index a22df71..fb7eed1 100755 --- a/treepkg +++ b/treepkg @@ -134,10 +134,12 @@ if ! ${BUILDNOW}; then touch "${BUILDORDER}" # If this package is already built quit silently - if is_built "${pkgbase}" "${fullver}"; then - add_order "ignore" - exit 0 - fi + for _pkg in ${pkgname[@]}; do + if is_built "${_pkg}" "${fullver}"; then + add_order "ignore" + exit 0 + fi + done # Ignore if already in build order egrep -q ";${pkgbase};" "${BUILDORDER}" && exit 0 -- cgit v1.2.3-2-g168b From 121e9ebb3caa4f6259960fb66c6ede0bbc875666 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=A1s=20Reynolds?= Date: Sat, 3 Nov 2012 13:23:05 -0300 Subject: Set terminal title with libremessages' term_title() Useful for showing progress --- treepkg | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'treepkg') diff --git a/treepkg b/treepkg index fb7eed1..8c4cc8e 100755 --- a/treepkg +++ b/treepkg @@ -18,12 +18,15 @@ source /etc/libretools.conf source $XDG_CONFIG_HOME/libretools/libretools.conf >/dev/null 2>&1|| true +term_title "$(basename $0)" + # Get system variables source /etc/makepkg.conf source $HOME/makepkg.conf >/dev/null 2>&1|| true # End inmediately but print an useful message trap_exit() { + term_title "error!" error "($(basename $0)) $@ (leftovers on ${BUILDDIR})" exit 1 } @@ -201,6 +204,9 @@ if [ ${DEPTH} -eq 0 ]; then ${VERBOSE} && msg "Building ${_pkg/_/ }" || true +# Remove leading zeros and space if any + term_title "$(echo ${_pkg/_/ } | sed "s/^0\+ \?//")" + # Run build command pushd "${BUILDDIR}/${_pkg}" >/dev/null sudo pacman -Syu --noconfirm @@ -227,4 +233,5 @@ fi fi +term_title "done" exit $? -- cgit v1.2.3-2-g168b