Project

General

Profile

Actions

Bug #6972

closed

GNU egrep script doesn't correctly quote $0

Added by Georg Nikodym about 7 years ago. Updated about 7 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
2016-05-13
Due date:
% Done:

0%

Estimated time:
Difficulty:
Medium
Tags:
needs-triage

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)
Actions #1

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.

Actions #2

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.

Actions #3

Updated by Georg Nikodym about 7 years ago

Pull request created (#2004).

Actions #4

Updated by Alexander Pyhalov about 7 years ago

  • Status changed from New to Resolved
Actions

Also available in: Atom PDF