diff options
-rw-r--r-- | debian/changelog | 1 | ||||
-rwxr-xr-x | debootstrap | 6 | ||||
-rw-r--r-- | functions | 16 | ||||
-rw-r--r-- | scripts/debian/sid | 4 | ||||
-rw-r--r-- | scripts/ubuntu/breezy | 2 | ||||
-rw-r--r-- | scripts/ubuntu/dapper | 2 | ||||
-rw-r--r-- | scripts/ubuntu/edgy | 2 | ||||
-rw-r--r-- | scripts/ubuntu/feisty | 2 | ||||
-rw-r--r-- | scripts/ubuntu/gutsy | 2 |
9 files changed, 19 insertions, 18 deletions
diff --git a/debian/changelog b/debian/changelog index 51a7532..5b5b419 100644 --- a/debian/changelog +++ b/debian/changelog @@ -8,6 +8,7 @@ debootstrap (1.0.4) UNRELEASED; urgency=low * Add (Ubuntu) hardy as a symlink to gutsy. * Unmount /lib/init/rw on exit (closes: #391604). * Cope if uncompressed Packages is missing from Release (closes: #402380). + * Don't rely on XSI test(1) extensions. -- Otavio Salvador <otavio@debian.org> Tue, 16 Oct 2007 16:47:55 -0200 diff --git a/debootstrap b/debootstrap index 8ba7769..7d1bb5a 100755 --- a/debootstrap +++ b/debootstrap @@ -264,7 +264,7 @@ if [ "$SECOND_STAGE_ONLY" = "true" ]; then fi SCRIPT=$DEBOOTSTRAP_DIR/suite-script else - if [ "$1" = "" -o "$2" = "" ]; then + if [ "$1" = "" ] || [ "$2" = "" ]; then usage_err 1 NEEDSUITETARGET "You must specify a suite and a target." fi SUITE="$1" @@ -279,7 +279,7 @@ else fi SCRIPT="$DEBOOTSTRAP_DIR/scripts/$1" - if [ -n "$VARIANT" -a -e "${SCRIPT}.${VARIANT}" ]; then + if [ -n "$VARIANT" ] && [ -e "${SCRIPT}.${VARIANT}" ]; then SCRIPT="${SCRIPT}.${VARIANT}" SUPPORTED_VARIANTS="$VARIANT" fi @@ -391,7 +391,7 @@ fi ########################################################################### if am_doing_phase finddebs; then - if [ "$FINDDEBS_NEEDS_INDICES" = "true" -o "$RESOLVE_DEPS" = "true" ]; then + if [ "$FINDDEBS_NEEDS_INDICES" = "true" ] || [ "$RESOLVE_DEPS" = "true" ]; then download_indices GOT_INDICES=true fi @@ -70,10 +70,10 @@ progress_next () { wgetprogress () { [ ! "$verbose" ] && QSWITCH="-q" local ret=0 - if [ "$USE_DEBIANINSTALLER_INTERACTION" -a "$PROGRESS_NEXT" ]; then + if [ "$USE_DEBIANINSTALLER_INTERACTION" ] && [ "$PROGRESS_NEXT" ]; then wget "$@" 2>&1 >/dev/null | $PKGDETAILS "WGET%" $PROGRESS_NOW $PROGRESS_NEXT $PROGRESS_END >&3 ret=$? - elif [ "$USE_BOOTFLOPPIES_INTERACTION" -a "$PROGRESS_NEXT" ]; then + elif [ "$USE_BOOTFLOPPIES_INTERACTION" ] && [ "$PROGRESS_NEXT" ]; then wget "$@" 2>&1 >/dev/null | $PKGDETAILS "WGET%" $PROGRESS_NOW $PROGRESS_NEXT $PROGRESS_END "$PROGRESS_WHAT" >&3 ret=$? else @@ -202,7 +202,7 @@ download_style () { doing_variant () { if [ "$1" = "$VARIANT" ]; then return 0; fi - if [ "$1" = "-" -a "$VARIANT" = "" ]; then return 0; fi + if [ "$1" = "-" ] && [ "$VARIANT" = "" ]; then return 0; fi return 1 } @@ -241,7 +241,7 @@ check_md5 () { local expsize="$3" relmd5=`md5sum < "$1" | sed 's/ .*$//'` relsize=`wc -c < "$1"` - if [ "$expsize" -ne "$relsize" -o "$expmd5" != "$relmd5" ]; then + if [ "$expsize" -ne "$relsize" ] || [ "$expmd5" != "$relmd5" ]; then return 1 fi return 0 @@ -325,7 +325,7 @@ just_get () { mkdir -p "${dest%/*}" if [ "${from#null:}" != "$from" ]; then error 1 NOTPREDL "%s was not pre-downloaded" "${from#null:}" - elif [ "${from#http://}" != "$from" -o "${from#ftp://}" != "$from" ]; then + elif [ "${from#http://}" != "$from" ] || [ "${from#ftp://}" != "$from" ]; then # http/ftp mirror if wgetprogress -O "$dest" "$from"; then return 0 @@ -511,11 +511,11 @@ download_release_indices () { ext="$ext $normmd ." md="$normmd" fi - if [ -x /bin/bunzip2 -a "$bz2md" != "" ]; then + if [ -x /bin/bunzip2 ] && [ "$bz2md" != "" ]; then ext="$ext $bz2md bz2" md="${md:-$bz2md}" fi - if [ -x /bin/gunzip -a "$gzmd" != "" ]; then + if [ -x /bin/gunzip ] && [ "$gzmd" != "" ]; then ext="$ext $gzmd gz" md="${md:-$gzmd}" fi @@ -778,7 +778,7 @@ setup_etc () { conditional_cp /etc/resolv.conf "$TARGET" conditional_cp /etc/hostname "$TARGET" - if [ "$DLDEST" = apt_dest -a ! -e "$TARGET/etc/apt/sources.list" ]; then + if [ "$DLDEST" = apt_dest ] && [ ! -e "$TARGET/etc/apt/sources.list" ]; then setup_apt_sources "http://debootstrap.invalid/" fi } diff --git a/scripts/debian/sid b/scripts/debian/sid index 85ebd05..0d65651 100644 --- a/scripts/debian/sid +++ b/scripts/debian/sid @@ -17,7 +17,7 @@ fi work_out_debs () { LIBC=libc6 - if [ "$ARCH" = "alpha" -o "$ARCH" = "ia64" ]; then + if [ "$ARCH" = "alpha" ] || [ "$ARCH" = "ia64" ]; then LIBC="libc6.1" elif [ "$ARCH" = "hurd-i386" ]; then LIBC="libc0.3" @@ -52,7 +52,7 @@ first_stage_install () { chown 0.0 "$TARGET/etc/fstab"; chmod 644 "$TARGET/etc/fstab" fi - if [ -x "$TARGET/usr/bin/md5sum.textutils" -a \! -e "$TARGET/usr/bin/md5sum" ]; then + if [ -x "$TARGET/usr/bin/md5sum.textutils" ] && [ \! -e "$TARGET/usr/bin/md5sum" ]; then cp "$TARGET/usr/bin/md5sum.textutils" "$TARGET/usr/bin/md5sum" fi diff --git a/scripts/ubuntu/breezy b/scripts/ubuntu/breezy index 71d8a53..13a9747 100644 --- a/scripts/ubuntu/breezy +++ b/scripts/ubuntu/breezy @@ -6,7 +6,7 @@ variants - buildd work_out_debs () { LIBC6=libc6 - if [ "$ARCH" = "alpha" -o "$ARCH" = "ia64" ]; then LIBC6="libc6.1"; fi + if [ "$ARCH" = "alpha" ] || [ "$ARCH" = "ia64" ]; then LIBC6="libc6.1"; fi required="$(get_debs Priority: required)" diff --git a/scripts/ubuntu/dapper b/scripts/ubuntu/dapper index 18d19aa..282a522 100644 --- a/scripts/ubuntu/dapper +++ b/scripts/ubuntu/dapper @@ -13,7 +13,7 @@ variants - buildd work_out_debs () { LIBC6=libc6 - if [ "$ARCH" = "alpha" -o "$ARCH" = "ia64" ]; then LIBC6="libc6.1"; fi + if [ "$ARCH" = "alpha" ] || [ "$ARCH" = "ia64" ]; then LIBC6="libc6.1"; fi required="$(get_debs Priority: required)" diff --git a/scripts/ubuntu/edgy b/scripts/ubuntu/edgy index efdc146..c1b7885 100644 --- a/scripts/ubuntu/edgy +++ b/scripts/ubuntu/edgy @@ -17,7 +17,7 @@ fi work_out_debs () { LIBC6=libc6 - if [ "$ARCH" = "alpha" -o "$ARCH" = "ia64" ]; then LIBC6="libc6.1"; fi + if [ "$ARCH" = "alpha" ] || [ "$ARCH" = "ia64" ]; then LIBC6="libc6.1"; fi required="$(get_debs Priority: required)" diff --git a/scripts/ubuntu/feisty b/scripts/ubuntu/feisty index b317c68..6b8b70f 100644 --- a/scripts/ubuntu/feisty +++ b/scripts/ubuntu/feisty @@ -17,7 +17,7 @@ fi work_out_debs () { LIBC6=libc6 - if [ "$ARCH" = "alpha" -o "$ARCH" = "ia64" ]; then LIBC6="libc6.1"; fi + if [ "$ARCH" = "alpha" ] || [ "$ARCH" = "ia64" ]; then LIBC6="libc6.1"; fi required="$(get_debs Priority: required)" diff --git a/scripts/ubuntu/gutsy b/scripts/ubuntu/gutsy index 4353812..40aa3db 100644 --- a/scripts/ubuntu/gutsy +++ b/scripts/ubuntu/gutsy @@ -17,7 +17,7 @@ fi work_out_debs () { LIBC6=libc6 - if [ "$ARCH" = "alpha" -o "$ARCH" = "ia64" ]; then LIBC6="libc6.1"; fi + if [ "$ARCH" = "alpha" ] || [ "$ARCH" = "ia64" ]; then LIBC6="libc6.1"; fi required="$(get_debs Priority: required)" |