Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
H
head.hackage
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
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 GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
jessoune29
head.hackage
Commits
f1d444ff
Commit
f1d444ff
authored
6 years ago
by
Ben Gamari
Browse files
Options
Downloads
Patches
Plain Diff
patch-tool: Apply cabal file patches
parent
c15cbc01
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
scripts/patch-tool
+16
-4
16 additions, 4 deletions
scripts/patch-tool
with
16 additions
and
4 deletions
scripts/patch-tool
+
16
−
4
View file @
f1d444ff
...
...
@@ -39,12 +39,24 @@ add_pkg_dirs() {
patch_pkg
()
{
local
pkg
=
$(
basename
$1
.patch
)
local
pkg_dir
=
packages/
$pkg
local
patch
=
$patches_dir
/
$pkg
.patch
if
[
!
-e
"
$patch
"
]
;
then
echo
"No patches for
$pkg
; skipping patching."
return
else
local
pkg_dir
=
packages/
$pkg
local
cabal
=
$patches_dir
/
$pkg
.cabal
local
patched
=
if
[
-f
"
$patch
"
]
;
then
echo
"Applied patch
$patch
to
$pkg
"
git
-C
$pkg_dir
apply
$patch
patched
=
1
fi
if
[
-f
"
$cabal
"
]
;
then
echo
"Updated cabal file of
$pkg
with
$cabal
"
cp
"
$cabal
"
$pkg_dir
/
*
.cabal
patched
=
1
fi
if
[
-n
"
$patched
"
]
;
then
git
-C
$pkg_dir
commit
-q
-a
-m
"head.hackage.org patch"
fi
}
...
...
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