[pbuilder] 01/01: examples: try to unify the scripts, additionally fixing some whitespace issues

Mattia Rizzolo mattia at debian.org
Sun Jul 2 19:46:37 UTC 2017


This is an automated email from the git hooks/post-receive script.

mattia pushed a commit to branch master
in repository pbuilder.

commit 2329ee204cf6a7e68c48ed486b00fd515cb37ec8
Author: Unit 193 <unit193 at ubuntu.com>
Date:   Sun Jul 2 15:32:59 2017 -0400

    examples: try to unify the scripts, additionally fixing some whitespace issues
    
    Signed-off-by: Mattia Rizzolo <mattia at debian.org>
---
 examples/B20autopkgtest              | 2 +-
 examples/B90lintian                  | 6 +-----
 examples/B90list-missing             | 8 +++++---
 examples/B91debc                     | 5 +++--
 examples/B91dpkg-i                   | 2 +-
 examples/B92test-pkg                 | 8 ++++----
 examples/C10shell                    | 5 ++++-
 examples/C11screen                   | 4 +++-
 examples/D20addnonfree               | 6 +++---
 examples/D65various-compiler-support | 2 +-
 examples/D90chrootmemo               | 2 +-
 examples/F90chrootmemo               | 2 +-
 examples/execute_paramtest.sh        | 5 ++---
 examples/pbuilder-distribution.sh    | 2 +-
 14 files changed, 31 insertions(+), 28 deletions(-)

diff --git a/examples/B20autopkgtest b/examples/B20autopkgtest
index b8d4f84..e2c3758 100644
--- a/examples/B20autopkgtest
+++ b/examples/B20autopkgtest
@@ -62,7 +62,7 @@ fi
 
 # runner/adt-run uses apt-utils's apt-ftparchive and
 # pbuilder's pbuilder-satisfydepends-classic
-apt-get install -y autopkgtest apt-utils pbuilder $newpid_name
+apt-get install -y "${APTGETOPT[@]}" autopkgtest apt-utils pbuilder $newpid_name
 
 # since autopkgtest 3.16 the --tmp-dir option is gone, make sure
 # we've --output-dir available though before using it
diff --git a/examples/B90lintian b/examples/B90lintian
index 3f48ab9..be88043 100644
--- a/examples/B90lintian
+++ b/examples/B90lintian
@@ -4,11 +4,7 @@ set -e
 
 BUILDDIR="${BUILDDIR:-/tmp/buildd}"
 
-install_packages() {
-    apt-get -y "${APTGETOPT[@]}" install "$@"
-}
-
-install_packages lintian
+apt-get install -y "${APTGETOPT[@]}" lintian
 
 echo "+++ lintian output +++"
 
diff --git a/examples/B90list-missing b/examples/B90list-missing
index 558732e..f695642 100644
--- a/examples/B90list-missing
+++ b/examples/B90list-missing
@@ -4,10 +4,12 @@
 # 343894: script from q-funk.
 
 # Depends on CDBS module in debian/rules:
-# include /usr/share/cdbs/1/rules/utils.mk 
+# include /usr/share/cdbs/1/rules/utils.mk
+
 BUILDDIR="${BUILDDIR:-/tmp/buildd}"
+
 echo "I: checking for missing files."
-cd "$BUILDDIR"/*/debian
-cd ..
+cd "$BUILDDIR"/*/debian/..
+
 fakeroot debian/rules list-missing
 #EOF
diff --git a/examples/B91debc b/examples/B91debc
index 180efdb..521ef5a 100644
--- a/examples/B91debc
+++ b/examples/B91debc
@@ -4,8 +4,9 @@
 # 343894: a script to run debc command, contributed from q-funk.
 
 BUILDDIR="${BUILDDIR:-/tmp/buildd}"
+
 apt-get install -y "${APTGETOPT[@]}" devscripts
-cd "$BUILDDIR"/*/debian
-cd ..
+cd "$BUILDDIR"/*/debian/..
+
 debc
 #EOF
diff --git a/examples/B91dpkg-i b/examples/B91dpkg-i
index acc1cdd..e82fe5e 100644
--- a/examples/B91dpkg-i
+++ b/examples/B91dpkg-i
@@ -19,7 +19,7 @@ dpkg -i "$BUILDDIR"/*.deb
 dpkg --purge $PKGNAMES
 
 # upgrade-remove check
-apt-get install -y "${APTGETOPT[@]}"  $PKGNAMES || true
+apt-get install -y "${APTGETOPT[@]}" $PKGNAMES || true
 dpkg -i "$BUILDDIR"/*.deb
 dpkg --remove $PKGNAMES
 
diff --git a/examples/B92test-pkg b/examples/B92test-pkg
index 15c6017..a39674e 100644
--- a/examples/B92test-pkg
+++ b/examples/B92test-pkg
@@ -4,15 +4,15 @@
 # run tests. Current directory is top of source-code.
 #
 # 2005, 2007 Junichi Uekawa
-# 
-set -e 
+#
+set -e
 
 BUILDDIR="${BUILDDIR:-/tmp/buildd}"
 
 echo "Installing the prerequisites"
 for PKG in $(ls "$BUILDDIR"/*.deb | sed -e's,.*/,,;s,_.*,,' ); do
-    apt-get install -y --force-yes "$PKG" || true 
-    apt-get remove -y "$PKG" || true 
+    apt-get install -y --force-yes "$PKG" || true
+    apt-get remove -y "$PKG" || true
 done
 # ignore the failures since they are not the prime interest
 
diff --git a/examples/C10shell b/examples/C10shell
index 6fa0cb6..9501336 100644
--- a/examples/C10shell
+++ b/examples/C10shell
@@ -2,7 +2,10 @@
 # example file to be used with --hookdir
 #
 # invoke shell if build fails.
+
 BUILDDIR="${BUILDDIR:-/tmp/buildd}"
-apt-get install -y "${APTGETOPT[@]}" vim less 
+
+apt-get install -y "${APTGETOPT[@]}" vim less
 cd "$BUILDDIR"/*/debian/..
+
 /bin/bash < /dev/tty > /dev/tty 2> /dev/tty
diff --git a/examples/C11screen b/examples/C11screen
index d89c9f9..2355b26 100755
--- a/examples/C11screen
+++ b/examples/C11screen
@@ -5,6 +5,8 @@
 
 export debian_chroot="pbuilder"
 BUILDDIR="${BUILDDIR:-/tmp/buildd}"
+
 apt-get install -y "${APTGETOPT[@]}" screen vim less
-cd "$BUILDDIR/*/debian/.."
+cd "$BUILDDIR"/*/debian/..
+
 screen </dev/tty > /dev/tty 2> /dev/tty
diff --git a/examples/D20addnonfree b/examples/D20addnonfree
index 5e8e85f..39a7998 100755
--- a/examples/D20addnonfree
+++ b/examples/D20addnonfree
@@ -1,9 +1,9 @@
 #!/bin/bash
 # example file to be used with --hookdir
 #
-# add non-free and contrib distributions to 
-# /etc/apt/sources.list 
+# add non-free and contrib distributions to
+# /etc/apt/sources.list
 
-echo ' Add sid non-free mirror to distribution'
+echo 'Add sid non-free mirror to distribution'
 echo 'deb '$(awk '/^deb / {print $2} ' < /etc/apt/sources.list | head -1 )' sid contrib non-free' >> /etc/apt/sources.list
 apt-get update
diff --git a/examples/D65various-compiler-support b/examples/D65various-compiler-support
index 7b5cd0f..2af2eeb 100644
--- a/examples/D65various-compiler-support
+++ b/examples/D65various-compiler-support
@@ -48,7 +48,7 @@ case "${CHOOSE_COMPILER}" in
         ;;
 esac
 
-apt-get -y install "${CHOOSE_COMPILER}" ${gxx_package} ${clang_package}
+apt-get install -y "${APTGETOPT[@]}" "${CHOOSE_COMPILER}" ${gxx_package} ${clang_package}
 
 if [ ! -x /usr/bin/"${CHOOSE_COMPILER}" ]; then
     echo >&2 "E: Package ${CHOOSE_COMPILER} does not contain compiler driver?"
diff --git a/examples/D90chrootmemo b/examples/D90chrootmemo
index dddd1e3..ef0bfe1 100644
--- a/examples/D90chrootmemo
+++ b/examples/D90chrootmemo
@@ -1,7 +1,7 @@
 #!/bin/sh
 # example file to be used with --hookdir
 #
-# an example to make a note that this is a chroot in / 
+# an example to make a note that this is a chroot in /
 # suggested by Turbo Fredriksson
 
 echo "This is a chroot made by pbuilder" > /CHROOT
diff --git a/examples/F90chrootmemo b/examples/F90chrootmemo
index de205a7..f0b42ad 100644
--- a/examples/F90chrootmemo
+++ b/examples/F90chrootmemo
@@ -1,7 +1,7 @@
 #!/bin/sh
 # example file to be used with --hookdir
 #
-# an example to make a note that this is a chroot in / 
+# an example to make a note that this is a chroot in /
 # suggested by Turbo Fredriksson
 
 # this shell is executed before logging in to chroot via login/execute.
diff --git a/examples/execute_paramtest.sh b/examples/execute_paramtest.sh
index 0f1d319..999f470 100755
--- a/examples/execute_paramtest.sh
+++ b/examples/execute_paramtest.sh
@@ -2,9 +2,8 @@
 # pbuilder example script.
 # Copyright 2003 Junichi Uekawa
 #Distributed under GPL version 2 or later
-
-
-# this is parameter testing script for 
+#
+# this is parameter testing script for
 # pbuilder execute.
 # This program will output the command-line
 
diff --git a/examples/pbuilder-distribution.sh b/examples/pbuilder-distribution.sh
index efd01dd..37d4cb0 100755
--- a/examples/pbuilder-distribution.sh
+++ b/examples/pbuilder-distribution.sh
@@ -12,7 +12,7 @@ case $OPERATION in
       ;;
 esac
 if ( $PROCEED == true ) then
-   shift 
+   shift
    sudo pbuilder $OPERATION \
       --basetgz $BASE_DIR/$DISTRIBUTION-base.tgz \
       --distribution $DISTRIBUTION \

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pbuilder/pbuilder.git



More information about the Pbuilder-maint mailing list