Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
G
gitlab-mirrors
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
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
wonko
gitlab-mirrors
Commits
15780243
Commit
15780243
authored
11 years ago
by
agb80
Browse files
Options
Downloads
Patches
Plain Diff
Added option for bzr
parent
2b2b95b8
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
add_mirror.sh
+6
-3
6 additions, 3 deletions
add_mirror.sh
with
6 additions
and
3 deletions
add_mirror.sh
+
6
−
3
View file @
15780243
...
...
@@ -20,6 +20,7 @@ PROGVERSION="${VERSION}"
#Default script options
svn
=
false
git
=
false
bzr
=
false
project_name
=
""
mirror
=
""
force
=
false
...
...
@@ -34,7 +35,7 @@ usage()
${
PROGNAME
}
${
PROGVERSION
}
- MIT License by Sam Gleske
USAGE:
${
PROGNAME
}
--git|--svn --project NAME --mirror URL [--authors-file FILE]
${
PROGNAME
}
--git|--svn
|--bzr
--project NAME --mirror URL [--authors-file FILE]
DESCRIPTION:
This will add a git or SVN repository to be mirrored by GitLab. It
...
...
@@ -69,7 +70,7 @@ EOF
}
#Short options are one letter. If an argument follows a short opt then put a colon (:) after it
SHORTOPTS
=
"hvfm:p:"
LONGOPTS
=
"help,version,force,git,svn,mirror:,project-name:,authors-file:"
LONGOPTS
=
"help,version,force,git,svn,
bzr,
mirror:,project-name:,authors-file:"
ARGS
=
$(
getopt
-s
bash
--options
"
${
SHORTOPTS
}
"
--longoptions
"
${
LONGOPTS
}
"
--name
"
${
PROGNAME
}
"
--
"
$@
"
)
eval set
--
"
$ARGS
"
while
true
;
do
...
...
@@ -136,11 +137,13 @@ function preflight() {
red_echo
" options. Choose one or other."
1>&2
STATUS
=
1
fi
if
!
${
git
}
&&
!
${
svn
}
;
then
if
!
${
git
}
&&
!
${
svn
}
&&
!
${
bzr
}
;
then
red_echo
-n
"Must specify the "
1>&2
yellow_echo
-n
"--git"
1>&2
red_echo
-n
" or "
1>&2
yellow_echo
-n
"--svn"
1>&2
red_echo
-n
" or "
1>&2
yellow_echo
-n
"--bzr"
1>&2
red_echo
" options."
1>&2
STATUS
=
1
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