Current-Users archive

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

Output alignment in build.sh



It seems that build.sh tries to manually align its output, but when displaying the values of various paths, it gets RELEASEDIR wrong (it's offset by 3 character positions):

...
===> HOST_SH:          /bin/sh
===> TOOLDIR path:     /build/netbsd-local/tools/x86_64/amd64
===> DESTDIR path:     /build/netbsd-local/dest/amd64
===> RELEASEDIR path:     /build/netbsd-local/release
===> makewrapper:      /build/netbsd-local/tools/x86_64/amd64/bin/nbmake-amd64
===> Updated /build/netbsd-local/tools/x86_64/amd64/bin/nbmake-amd64
--- release ---
...

The attached patch is one way to fix this alignment.  With the patch, it
generates

...
===> HOST_SH:          /bin/sh
===> TOOLDIR path:     /build/netbsd-local/tools/x86_64/amd64
===> DESTDIR path:     /build/netbsd-local/dest/amd64
===> RELEASEDIR path:  /build/netbsd-local/release
===> makewrapper:      /build/netbsd-local/tools/x86_64/amd64/bin/nbmake-amd64
===> Updated /build/netbsd-local/tools/x86_64/amd64/bin/nbmake-amd64
--- release ---
...


-------------------------------------------------------------------------
| Paul Goyette     | PGP Key fingerprint:     | E-mail addresses:       |
| Customer Service | FA29 0E3B 35AF E8AE 6651 | paul at whooppee.com    |
| Network Engineer | 0786 F758 55DE 53BA 7731 | pgoyette at juniper.net |
| Kernel Developer |                          | pgoyette at netbsd.org  |
-------------------------------------------------------------------------
Index: src/build.sh
===================================================================
RCS file: /cvsroot/src/build.sh,v
retrieving revision 1.237
diff -u -p -r1.237 build.sh
--- src/build.sh        17 Jun 2010 08:19:02 -0000      1.237
+++ src/build.sh        21 Aug 2010 23:53:09 -0000
@@ -1219,7 +1219,12 @@ validatemakeparams()
                fi
                eval ${var}=\"\${newval}\"
                eval export ${var}
-               statusmsg "${var} path:     ${newval}"
+               if [ "${var}" = "RELEASEDIR" ]; then
+                       pad=""
+               else
+                       pad="   "
+               fi
+               statusmsg "${var} path: ${pad} ${newval}"
        done
 
        # RELEASEMACHINEDIR is just a subdir name, e.g. "i386".


Home | Main Index | Thread Index | Old Index