From 258ab6d843596484bd25b5f308d811a4b5051137 Mon Sep 17 00:00:00 2001 From: Otavio Salvador Date: Tue, 24 Mar 2009 14:08:39 +0000 Subject: Apply patch from Luca Favatella to improve coding style. r57962 --- debian/changelog | 7 +++++++ debootstrap | 8 ++++---- functions | 10 +++++----- 3 files changed, 16 insertions(+), 9 deletions(-) diff --git a/debian/changelog b/debian/changelog index 720606a..fcd9c3b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +debootstrap (1.0.13) UNRELEASED; urgency=low + + * Apply patch from Luca Favatella to improve + coding style. + + -- Otavio Salvador Tue, 24 Mar 2009 11:02:52 -0300 + debootstrap (1.0.12) unstable; urgency=low [ Otavio Salvador ] diff --git a/debootstrap b/debootstrap index cde6d9c..8ddac12 100755 --- a/debootstrap +++ b/debootstrap @@ -9,7 +9,7 @@ export PATH ########################################################################### -if [ "$DEBOOTSTRAP_DIR" = "" ]; then +if [ -z "$DEBOOTSTRAP_DIR" ]; then if [ -x /debootstrap/debootstrap ]; then DEBOOTSTRAP_DIR=/debootstrap else @@ -96,7 +96,7 @@ EOF ########################################################################### -if [ "$PKGDETAILS" = "" ]; then +if [ -z "$PKGDETAILS" ]; then error 1 NO_PKGDETAILS "No pkgdetails available; either install perl, or build pkgdetails.c from source" fi @@ -299,14 +299,14 @@ if [ "$SECOND_STAGE_ONLY" = "true" ]; then VARIANT=$(cat $DEBOOTSTRAP_DIR/variant) SUPPORTED_VARIANTS="$VARIANT" fi - if [ "$CHROOTDIR" = "" ]; then + if [ -z "$CHROOTDIR" ]; then TARGET=/ else TARGET=$CHROOTDIR fi SCRIPT=$DEBOOTSTRAP_DIR/suite-script else - if [ "$1" = "" ] || [ "$2" = "" ]; then + if [ -z "$1" ] || [ -z "$2" ]; then usage_err 1 NEEDSUITETARGET "You must specify a suite and a target." fi SUITE="$1" diff --git a/functions b/functions index 001018b..2aecd5d 100644 --- a/functions +++ b/functions @@ -251,7 +251,7 @@ get () { fi if [ -e "$2" ]; then - if [ "$3" = "" ]; then + if [ -z "$3" ]; then return 0 elif [ "$3" = nocache ]; then rm -f "$2" @@ -306,7 +306,7 @@ get () { md5="" fi fi - if [ "$md5" = "" ]; then + if [ -z "$md5" ]; then [ "$dest2" = "$dest" ] || mv "$dest2" "$dest" case "$typ" in gz) gunzip "$dest" ;; @@ -478,7 +478,7 @@ download_release_indices () { done COMPONENTS="$(echo $COMPONENTS)" - if [ "$COMPONENTS" = "" ]; then + if [ -z "$COMPONENTS" ]; then mv "$reldest" "$reldest.malformed" error 1 INVALIDREL "Invalid Release file, no valid components" fi @@ -637,9 +637,9 @@ download_release () { local pkgdest="$TARGET/$($DLDEST pkg "$SUITE" "$c" "$ARCH" "$m" "$path")" if [ ! -e "$pkgdest" ]; then continue; fi pkgs_to_get="$(download_debs "$m" "$pkgdest" $pkgs_to_get 5>&1 1>&6)" - if [ "$pkgs_to_get" = "" ]; then break; fi + if [ -z "$pkgs_to_get" ]; then break; fi done 6>&1 - if [ "$pkgs_to_get" = "" ]; then break; fi + if [ -z "$pkgs_to_get" ]; then break; fi done progress $dloaddebs $totaldebs DOWNDEBS "Downloading packages" if [ "$pkgs_to_get" != "" ]; then -- cgit v0.12