pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/mk/bulk Corrected the quoting of variables in clear ca...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/0aff704251fd
branches:  trunk
changeset: 503638:0aff704251fd
user:      rillig <rillig%pkgsrc.org@localhost>
date:      Thu Nov 24 18:21:54 2005 +0000

description:
Corrected the quoting of variables in clear cases.

diffstat:

 mk/bulk/build |  25 +++++++++++++------------
 1 files changed, 13 insertions(+), 12 deletions(-)

diffs (74 lines):

diff -r 235deab11ca0 -r 0aff704251fd mk/bulk/build
--- a/mk/bulk/build     Thu Nov 24 13:24:10 2005 +0000
+++ b/mk/bulk/build     Thu Nov 24 18:21:54 2005 +0000
@@ -1,5 +1,5 @@
 #!/bin/sh
-# $NetBSD: build,v 1.83 2005/11/23 18:27:13 erh Exp $
+# $NetBSD: build,v 1.84 2005/11/24 18:21:54 rillig Exp $
 
 #
 # Copyright (c) 1999, 2000 Hubert Feyrer <hubertf%NetBSD.org@localhost>
@@ -371,6 +371,7 @@
 # Everything is prepared. We can start building the real packages now.
 #
 cd "${pkgsrc_dir}" || die "The pkgsrc directory does not exist."
+
 echo "Starting actual build using the order specified in $ORDERFILE..."
 
 # Loop over every package in the correct order.  Before building
@@ -386,8 +387,8 @@
 # make sure we have something to grep in in the build loop
 touch "${main_buildlog}" || die "Cannot write to ${main_buildlog}."
 
-tot=`wc -l $ORDERFILE | ${AWK} '{print $1}'`
-for pkgdir in `cat $ORDERFILE`
+tot=`wc -l "${ORDERFILE}" | ${AWK} '{print $1}'`
+for pkgdir in `cat "${ORDERFILE}"`
 do
        if ${GREP} -q "^${pkgdir}\$" "${main_buildlog}"; then
                : "skip this package"
@@ -395,7 +396,7 @@
                built=`wc -l "${main_buildlog}" | ${AWK} '{print $1}'`
                percent=`echo $built $tot | ${AWK} '{printf("%4.1f%%",$1*100/$2);}'`
                ( cd "${pkgsrc_dir}/${pkgdir}" \
-                 && ${NICE_LEVEL} ${BMAKE} USE_BULK_CACHE=yes $target \
+                 && ${NICE_LEVEL} ${BMAKE} USE_BULK_CACHE=yes "${target}" \
                        $makeargs </dev/null | post_filter_cmd
                ) || true
                echo "$pkgdir" >> "${main_buildlog}"
@@ -405,18 +406,18 @@
 echo "Build finished.  Removing all installed packages left over from build..."
 for pkgname in `${PKG_TOOLS_BIN}/pkg_info -e \*`
 do
-       if ${PKG_TOOLS_BIN}/pkg_info -qe $pkgname; then
+       if ${PKG_TOOLS_BIN}/pkg_info -qe "${pkgname}"; then
                pkgdir=`${AWK} '$2 == "'"$pkgname"'" { print $1; }' "$INDEXFILE"`
                case "${BULK_PREREQ}" in
-                       *$pkgdir* )
+                       *"${pkgdir}"* )
                                echo "Keeping BULK_PREREQ: $pkgname ($pkgdir)" ;
                                ;;
                        * )
-                               echo ${PKG_TOOLS_BIN}/pkg_delete -r $pkgname
-                               ${PKG_TOOLS_BIN}/pkg_delete -r $pkgname
-                               if ${PKG_TOOLS_BIN}/pkg_info -qe $pkgname; then
+                               echo ${PKG_TOOLS_BIN}/pkg_delete -r "${pkgname}"
+                               ${PKG_TOOLS_BIN}/pkg_delete -r "${pkgname}"
+                               if ${PKG_TOOLS_BIN}/pkg_info -qe "${pkgname}"; then
                                        echo "$pkgname ($pkgdir) did not deinstall nicely.  Forcing the deinstall"
-                                       ${PKG_TOOLS_BIN}/pkg_delete -f $pkgname || true
+                                       ${PKG_TOOLS_BIN}/pkg_delete -f "${pkgname}" || true
                                fi
                                ;;
                esac
@@ -459,8 +460,8 @@
 # Notify the ADMIN of the finished build.
 #
 case $noemail in no)
-       cat ${FTP}/pkgsrc-results-${BUILDDATE}.txt \
-       | ${MAIL_CMD} -s "pkgsrc ${OPSYS} ${OS_VERSION}/${MACHINE_ARCH} bulk build results $BUILDDATE" $ADMIN
+       cat "${FTP}/pkgsrc-results-${BUILDDATE}.txt" \
+       | ${MAIL_CMD} -s "pkgsrc ${OPSYS} ${OS_VERSION}/${MACHINE_ARCH} bulk build results $BUILDDATE" "$ADMIN"
 esac
 
 # Done!



Home | Main Index | Thread Index | Old Index