Bug #6972
closedGNU egrep script doesn't correctly quote $0
0%
Description
My use case is a test rig with a contrived path with spaces to catch quoting problems.
PATH=/testing/constrained toolset
The "constrained toolset" directory is filled with symlinks to the limited set of
external programs that we're willing to allow bitkeeper to call out to.
I offer this patch:
--- egrep-old 2016-05-13 08:48:38.672564991 -0700
+++ egrep 2016-05-13 08:50:07.222135259 -0700@ -1,8 +1,8
@
#!/bin/sh
-REALPATH=`realpath $0`
-DIRNAME=`dirname $REALPATH`
-BASENAME=`basename $0`
+REALPATH=`realpath "$0"`
+DIRNAME=`dirname "$REALPATH"`
+BASENAME=`basename "$0"`
case $BASENAME in
egrep)
Updated by Alexander Pyhalov about 7 years ago
Please, create pull request against https://github.com/OpenIndiana/oi-userland/ . Don't forget to add REQUIRED_PACKAGES to ggrep Makefile and bump COMPONENT_REVISION.
Updated by Georg Nikodym about 7 years ago
Sigh. You are assuming that I know what you're talking about...
I'll eventually figure it out but it will take time...
Be ready for n00b questions.
Updated by Alexander Pyhalov about 7 years ago
- Status changed from New to Resolved