Opened 16 years ago

Closed 12 years ago

Last modified 12 years ago

#3376 closed enhancement (fixed)

Rewrite lgrep and hgrep scripts to be included into Haiku as optional package (easy)

Reported by: monni Owned by: scottmc
Priority: normal Milestone: Unscheduled
Component: Applications/Command Line Tools Version: R1/alpha1
Keywords: Cc:
Blocked By: Blocking:
Platform: All

Description

BeOS wannabes used to have lgrep and hgrep scripts to assist finding functions in libraries. I want them in Haiku too...

Attachments (2)

lgrep (859 bytes ) - added by monni 16 years ago.
Library Grep - lgrep
hgrep (75 bytes ) - added by monni 16 years ago.
Header Grep - hgrep

Download all attachments as: .zip

Change History (20)

by monni, 16 years ago

Attachment: lgrep added

Library Grep - lgrep

by monni, 16 years ago

Attachment: hgrep added

Header Grep - hgrep

comment:1 by monni, 16 years ago

Component: ApplicationsApplications/Command Line Tools

comment:2 by axeld, 16 years ago

We could put it into the optional development package, but they shouldn't be part of the base install.

comment:3 by axeld, 16 years ago

Summary: [easy] I want this and that added to Haiku ;)add lgrep and hgrep to Haiku

Oh, and please use more descriptive summaries in the future :-)

in reply to:  2 comment:4 by monni, 16 years ago

Replying to axeld:

We could put it into the optional development package, but they shouldn't be part of the base install.

Agree with that.

BTW, I didn't make more descriptive summary back then because I wasn't sure if there was something else missing that could also help new developers resolve errors when configuring and building third-party software, and making new ticket for each enhancement didn't sound such a good idea either.

comment:5 by scottmc, 15 years ago

Owner: changed from axeld to scottmc
Status: newassigned
Summary: add lgrep and hgrep to HaikuCreate OptionalPackage for adding lgrep and hgrep to Haiku

Seems easy enough to do.

comment:6 by scottmc, 15 years ago

@monni, Where did the hgrep and lgrep you attached to this ticket comes from, as in who was the original author?

comment:7 by monni, 15 years ago

As far as I remember, those were originally posted by one BeShare user to be used as bash macros. I fixed a few compatibility issues in them and rewrote them as standalone shell scripts.

comment:8 by monni, 15 years ago

I'm pretty sure mmu_man was the original author.

comment:9 by mmu_man, 15 years ago

AFAIR I did found the commands used in hgrep somewhere and adapted it and named it hgrep. I definitely came up with something called lgrep in ZETA, but it was more simple than the attached one. Both were declared as functions in /etc/profile.d/devaliases. In any case it's probably ok to just rewrite them.

comment:10 by scottmc, 15 years ago

Version: R1/pre-alpha1R1/alpha1

comment:11 by scottmc, 15 years ago

Milestone: R1Unscheduled
Summary: Create OptionalPackage for adding lgrep and hgrep to HaikuRewrite lgrep and hgrep scripts to be included into Haiku as optional package (easy)

Since this was not in BeOS R5 be default, I see no need to have it as part of the R1 milestone, so pushing it out to Unscheduled. Since the origin of these scripts is not clear we should rewrite them. If someone wants to rewrite these two scripts and attach them to this ticket, be sure to include proper credits this time, I will then create an optionalpackage for them.

comment:12 by monni, 15 years ago

I don't see how people could "rewrite" them more than I did after I got them in BeShare... Like mmu_man said, those were originally defined as functions. My original idea was to make them separate shell scripts so I could use same copy on shared partition in several different BeOS installations on same machine and to ease sharing the "modified" scripts back in BeShare.

comment:13 by leavengood, 14 years ago

These don't need to be rewritten. For one thing hgrep is just 2 lines (one of which is the usual #!/bin/sh call.) We can add a comment acknowledging monni and mmu_man as authors, with the usual Haiku copyright and MIT license note. If someone comes along and complains then they can be rewritten but that is never going to happen.

Scott: if you could do that I think that would be fine. I'm not sure they deserve a whole optional package though. Is there already a collection of development utilities these could be added to?

comment:14 by scottmc, 14 years ago

added these to haikuports repo for now:
http://www.ports.haiku-files.org/changeset/1679/
Further updates to them can be done there.

comment:15 by scottmc, 12 years ago

Resolution: fixed
Status: in-progressclosed

Added as OptionalPackages in hrev44393

comment:16 by umccullough, 12 years ago

Not sure you tested the hgrep after you added it to haikuports - at least the finddir path has been misspelled:

http://ports.haiku-files.org/browser/haikuports/trunk/sys-apps/hgrep/hgrep

Might want to fix that before adding it to the official image.

comment:17 by scottmc, 12 years ago

Actually missed a closing ) as well... should be ok now in hrev44396.

comment:18 by Disreali, 12 years ago

What is the reason to have these as optional packages? They are so small it would just be easier to add them to the base image and avoid the bandwidth usage or need to download.

Note: See TracTickets for help on using tickets.