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
01f6d6e6
Commit
01f6d6e6
authored
11 years ago
by
Sam Gleske
Browse files
Options
Downloads
Patches
Plain Diff
no-create option preflight check
parent
3e9b7105
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
add_mirror.sh
+8
-0
8 additions, 0 deletions
add_mirror.sh
with
8 additions
and
0 deletions
add_mirror.sh
+
8
−
0
View file @
01f6d6e6
...
...
@@ -27,6 +27,7 @@ bzr=false
project_name
=
""
mirror
=
""
force
=
false
no_create_set
=
false
#
# ARGUMENT HANDLING
...
...
@@ -120,6 +121,7 @@ while true; do
shift
2
;;
-n
|
--no-create
)
no_create_set
=
true
no_create
=
"
${
2
}
"
shift
2
;;
...
...
@@ -184,6 +186,12 @@ function preflight() {
red_echo
" option."
1>&2
STATUS
=
1
fi
#test no_create option
if
${
no_create_set
}
&&
[
-z
"
${
no_create
}
"
]
;
then
yellow_echo
-n
"--no-create"
1>&2
red_echo
" option must have a git remote to push."
1>&2
STATUS
=
1
fi
#test authors_file path for existence
if
[
!
-z
"
${
authors_file
}
"
-a
!
-f
"
${
authors_file
}
"
]
;
then
red_echo
-n
"Specified "
...
...
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