Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
ensembl
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Iterations
Wiki
Requirements
Jira
Code
Merge requests
1
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
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
ensembl-gh-mirror
ensembl
Commits
22b5fde8
Commit
22b5fde8
authored
14 years ago
by
Andreas Kusalananda Kähäri
Browse files
Options
Downloads
Patches
Plain Diff
Do command line parsing.
parent
4e956a03
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
misc-scripts/production_database/scripts/update_database_list.pl
+25
-1
25 additions, 1 deletion
...ripts/production_database/scripts/update_database_list.pl
with
25 additions
and
1 deletion
misc-scripts/production_database/scripts/update_database_list.pl
+
25
−
1
View file @
22b5fde8
...
...
@@ -3,13 +3,13 @@
use
strict
;
use
warnings
;
use
Getopt::
Long
qw( :config no_ignore_case )
;
use
DBI
qw( :sql_types )
;
my
$release
;
my
@servers
=
('
ens-staging1
',
'
ens-staging2
');
my
$master
=
'
ens-staging1
';
my
$dbport
=
'
3306
';
my
$dbuser
=
'
ensadmin
';
my
$dbpass
;
...
...
@@ -19,6 +19,30 @@ my $dbropass;
my
$opt_help
=
0
;
my
$opt_about
=
0
;
if
(
!
GetOptions
(
'
release|r=i
'
=>
\
$release
,
'
master|m=s
'
=>
\
$master
,
'
server|s=s@
'
=>
\
@servers
,
'
dbuser|u=s
'
=>
\
$dbuser
,
'
dbpass|p=s
'
=>
\
$dbpass
,
'
dbport|P=s
'
=>
\
$dbport
,
'
dbrouser|rou
'
=>
\
$dbrouser
,
'
dbropass|rop
'
=>
\
$dbropass
,
'
help|h!
'
=>
\
$opt_help
,
'
about!
'
=>
\
$opt_about
)
||
$opt_help
)
{
usage
();
exit
();
}
elsif
(
$opt_about
)
{
about
();
exit
();
}
elsif
(
!
defined
(
$release
)
)
{
print
("
ERROR: Release was not specified! (use -r or --release)
\n
");
usage
();
exit
();
}
my
%databases
;
foreach
my
$server
(
@servers
)
{
my
$dsn
=
sprintf
(
'
DBI:mysql:host=%s;port=%d
',
$server
,
$dbport
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
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