Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
B
brew
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to JiHu GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
KMSCAKKSCFKA AKFACAMADCAS
brew
Commits
f32d0e6a
Commit
f32d0e6a
authored
15 years ago
by
Max Howell
Browse files
Options
Downloads
Patches
Plain Diff
UncompressedScriptFormula
parent
def522a5
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Cellar/homebrew/brewkit.rb
+12
-0
12 additions, 0 deletions
Cellar/homebrew/brewkit.rb
Formula/ack.rb
+8
-11
8 additions, 11 deletions
Formula/ack.rb
with
20 additions
and
11 deletions
Cellar/homebrew/brewkit.rb
+
12
−
0
View file @
f32d0e6a
...
...
@@ -159,6 +159,18 @@ private
end
end
# you have to reimplement initialize to set the version, for example usage
# see the ack script
class
UncompressedScriptFormula
<
Formula
def
initialize
(
url
)
@url
=
url
@name
=
File
.
basename
url
end
def
uncompress
path
path
.
dirname
end
end
def
inreplace
(
path
,
before
,
after
)
before
=
before
.
to_s
.
gsub
(
'"'
,
'\"'
).
gsub
(
'/'
,
'\/'
)
after
=
after
.
to_s
.
gsub
(
'"'
,
'\"'
).
gsub
(
'/'
,
'\/'
)
...
...
This diff is collapsed.
Click to expand it.
Formula/ack.rb
+
8
−
11
View file @
f32d0e6a
...
...
@@ -4,22 +4,19 @@ require 'fileutils'
homepage
=
'http://betterthangrep.com/'
class
Uncompressed
Formula
<
Formula
class
AckFormula
<
Uncompressed
Script
Formula
def
initialize
@name
=
'
ack'
super
(
'http://ack.googlecode.com/svn/tags/1.88/
ack'
)
@version
=
'1.88'
@url
=
'http://ack.googlecode.com/svn/tags/1.88/ack'
@md5
=
'8009a13ab0fc66047bea0ea2ad89419c'
end
def
uncompress
path
path
.
dirname
end
end
UncompressedFormula
.
new
.
brew
do
|
prefix
|
ack
=
AckFormula
.
new
ack
.
brew
do
|
prefix
|
bin
=
prefix
+
'bin'
FileUtils
.
mkpath
bin
FileUtils
.
cp
'ack'
,
bin
`chmod u+x
#{
bin
}
/ack`
bin
.
mkpath
FileUtils
.
cp
ack
.
name
,
bin
(
bin
+
ack
.
name
).
chmod
0544
nil
end
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment