Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
GHC
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
0
Merge Requests
0
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Package Registry
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Alex D
GHC
Commits
8434073f
Commit
8434073f
authored
Jun 19, 2007
by
Ian Lynagh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add a push-all script
parent
f0be4602
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
94 additions
and
0 deletions
+94
-0
boot
boot
+1
-0
push-all
push-all
+93
-0
No files found.
boot
View file @
8434073f
...
...
@@ -12,6 +12,7 @@ do
fi
done
chmod
+x push-all
chmod
+x rts/gmp/configure
echo
"Booting ."
...
...
push-all
0 → 100644
View file @
8434073f
#!/usr/bin/perl -w
use
strict
;
my
@top_dirs
=
("
nofib
",
"
testsuite
");
my
$reporoot
;
my
$verbose
=
1
;
my
$ignore_failure
=
0
;
# --checked-out says we are pushing to a checked out tree
my
$checked_out
=
0
;
sub
message
{
if
(
$verbose
)
{
print
"
@_
\n
";
}
}
sub
warning
{
print
"
warning:
@_
\n
";
}
sub
darcs
{
message
"
== running darcs
@_
";
system
("
darcs
",
@
_
)
==
0
or
$ignore_failure
or
die
"
darcs failed: $?
";
}
sub
darcs_push
{
darcs
("
push
",
"
--no-set-default
",
@
_
);
}
sub
pushall
{
my
$dir
;
my
$ghcrepo
=
$checked_out
?
$reporoot
:
"
$reporoot
/ghc
";
darcs_push
(
$ghcrepo
,
@
_
);
for
$dir
(
@top_dirs
)
{
if
(
-
d
$dir
&&
-
d
"
$dir
/_darcs
")
{
darcs_push
("
$reporoot
/
$dir
",
@
_
,
"
--repodir
",
$dir
);
}
else
{
message
"
==
$dir
not present or not a repository; skipping
";
}
}
for
my
$pkg
(`
cat libraries/core-packages libraries/extra-packages
`)
{
chomp
$pkg
;
$dir
=
"
libraries/
$pkg
";
if
(
-
d
"
$dir
")
{
darcs_push
("
$reporoot
/
$dir
",
@
_
,
"
--repodir
",
"
$dir
");
}
else
{
warning
("
$pkg
doesn't exist, use 'darcs-all get' to get it
");
}
}
}
sub
main
{
if
(
!
-
d
"
_darcs
"
||
!
-
d
"
compiler
")
{
die
"
error: darcs-all must be run from the top level of the ghc tree.
"
}
if
(
$
#_ ne -1) {
while
(
$
#_ ne -1) {
my
$arg
=
shift
;
# We handle -q here as well as lower down as we need to skip
# over it if it comes before the darcs command
if
(
$arg
eq
"
-q
")
{
$verbose
=
0
;
}
elsif
(
$arg
eq
"
--checked-out
")
{
$checked_out
=
1
;
}
else
{
$reporoot
=
$arg
;
if
(
grep
/^-q$/
,
@
_
)
{
$verbose
=
0
;
}
last
;
}
}
}
else
{
die
"
Where do you want to push to?
";
}
pushall
(
@
_
);
}
main
(
@ARGV
);
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment