xbps-src: repair 'update-bulk' target (close #1121).

This commit is contained in:
Juan RP 2015-03-14 09:47:56 +01:00
parent a8962ace18
commit d8f69bde78
2 changed files with 7 additions and 2 deletions

View File

@ -11,6 +11,8 @@ bulk_getlink() {
} }
bulk_build() { bulk_build() {
local _pkgs pkg found f x tmpf
if ! command -v xbps-checkvers &>/dev/null; then if ! command -v xbps-checkvers &>/dev/null; then
msg_error "xbps-src: cannot find xbps-checkvers(8) command!\n" msg_error "xbps-src: cannot find xbps-checkvers(8) command!\n"
fi fi
@ -59,7 +61,7 @@ bulk_build() {
} }
bulk_update() { bulk_update() {
local args="$1" pkgs= local args="$1" pkgs f
pkgs="$(bulk_build ${args})" pkgs="$(bulk_build ${args})"
msg_normal "xbps-src: the following packages must be rebuilt and updated:\n" msg_normal "xbps-src: the following packages must be rebuilt and updated:\n"
@ -68,6 +70,7 @@ bulk_update() {
done done
echo echo
for f in ${pkgs}; do for f in ${pkgs}; do
XBPS_TARGET_PKG=$f
read_pkg read_pkg
msg_normal "xbps-src: building ${pkgver} ...\n" msg_normal "xbps-src: building ${pkgver} ...\n"
if [ -n "$CHROOT_READY" -a -z "$IN_CHROOT" ]; then if [ -n "$CHROOT_READY" -a -z "$IN_CHROOT" ]; then

View File

@ -467,7 +467,9 @@ readonly XBPS_DIGEST_CMD="xbps-uhelper digest"
readonly XBPS_CMPVER_CMD="xbps-uhelper cmpver" readonly XBPS_CMPVER_CMD="xbps-uhelper cmpver"
readonly XBPS_TARGET="$1" readonly XBPS_TARGET="$1"
readonly XBPS_TARGET_PKG="${2##*/}" if [ -n "$2" ]; then
readonly XBPS_TARGET_PKG="${2##*/}"
fi
# Check if stdout is a tty; if false disable colors. # Check if stdout is a tty; if false disable colors.
test -t 1 || export NOCOLORS=1 test -t 1 || export NOCOLORS=1