summaryrefslogtreecommitdiff
path: root/sync-all
diff options
context:
space:
mode:
authorSimon Marlow <marlowsd@gmail.com>2012-12-21 15:06:11 +0000
committerSimon Marlow <marlowsd@gmail.com>2013-01-07 15:52:22 +0000
commit7d1216ab9b7e80a860de0498854883761d6e7d33 (patch)
tree36eda049fff97f2ceb8f497c8658b7c4fcaba4ee /sync-all
parent4da767e24ea09e0708a43886f0ac9e777c7145f0 (diff)
downloadhaskell-7d1216ab9b7e80a860de0498854883761d6e7d33.tar.gz
make "./sync-all -r <path> remote set-url origin" work
Diffstat (limited to 'sync-all')
-rwxr-xr-xsync-all10
1 files changed, 8 insertions, 2 deletions
diff --git a/sync-all b/sync-all
index ce613467da..0b29903ae2 100755
--- a/sync-all
+++ b/sync-all
@@ -417,15 +417,21 @@ sub scmall {
}
elsif ($command eq "remote") {
my @scm_args;
+ my $rpath;
$ignore_failure = 1;
+ if ($remotepath eq '-') {
+ $rpath = "$repo_base/$localpath";
+ } else {
+ $rpath = $path;
+ }
if ($subcommand eq 'add') {
- @scm_args = ("remote", "add", $branch_name, $path);
+ @scm_args = ("remote", "add", $branch_name, $rpath);
} elsif ($subcommand eq 'rm') {
@scm_args = ("remote", "rm", $branch_name);
} elsif ($subcommand eq 'set-branches') {
@scm_args = ("remote", "set-branches", $branch_name);
} elsif ($subcommand eq 'set-url') {
- @scm_args = ("remote", "set-url", $branch_name, $path);
+ @scm_args = ("remote", "set-url", $branch_name, $rpath);
}
scm ($localpath, $scm, @scm_args, @args);
}