Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
forge001
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor 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
Gerhard Gonter
forge001
Commits
92e3fbae
Commit
92e3fbae
authored
8 years ago
by
Gerhard Gonter
Browse files
Options
Downloads
Patches
Plain Diff
allow alternative configration structure with TAPROJ
parent
4be5a631
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
textarchive/lib/TA/ObjReg.pm
+9
-1
9 additions, 1 deletion
textarchive/lib/TA/ObjReg.pm
textarchive/vlib001.pl
+25
-6
25 additions, 6 deletions
textarchive/vlib001.pl
with
34 additions
and
7 deletions
textarchive/lib/TA/ObjReg.pm
+
9
−
1
View file @
92e3fbae
...
@@ -67,7 +67,15 @@ sub _get_project_paths
...
@@ -67,7 +67,15 @@ sub _get_project_paths
{
{
my
$proj_name
=
shift
;
my
$proj_name
=
shift
;
my
$proj_cfg_dir
=
join
('
/
',
$ENV
{'
TABASE
'},
'
projects
',
$proj_name
);
my
$proj_cfg_dir
;
if
(
exists
(
$ENV
{'
TAPROJ
'}))
{
$proj_cfg_dir
=
join
('
/
',
$ENV
{'
TAPROJ
'},
$proj_name
);
}
else
{
$proj_cfg_dir
=
join
('
/
',
$ENV
{'
TABASE
'},
'
projects
',
$proj_name
);
}
my
$proj_cfg_fnm
=
join
('
/
',
$proj_cfg_dir
,
'
config.json
');
my
$proj_cfg_fnm
=
join
('
/
',
$proj_cfg_dir
,
'
config.json
');
return
(
$proj_cfg_dir
,
$proj_cfg_fnm
);
return
(
$proj_cfg_dir
,
$proj_cfg_fnm
);
...
...
This diff is collapsed.
Click to expand it.
textarchive/vlib001.pl
+
25
−
6
View file @
92e3fbae
...
@@ -32,9 +32,12 @@
...
@@ -32,9 +32,12 @@
=head1 DESCRIPTION
=head1 DESCRIPTION
Updates a file catalog using md5cat library methods and registers the
Updates a file catalog using md5cat library methods and registers the
files in the project's object registry. The environment variable TABASE
files in the project's object registry. Either the environment variable
must point to the directory where the object registry's configuration
TAPROJ or TABASE must point to the directory where the object registry's
is stored.
configuration is stored. The configuration is named either
$ENV{'TAPROJ'}/<project>/config.json
or
$ENV{'TABASE'}/projects/<project>/config.json
=head1 BACKENDS
=head1 BACKENDS
...
@@ -122,14 +125,25 @@ while (my $arg= shift (@ARGV))
...
@@ -122,14 +125,25 @@ while (my $arg= shift (@ARGV))
print
"
debug level:
$DEBUG
\n
";
print
"
debug level:
$DEBUG
\n
";
&usage
('
environment variable TABASE not set
')
unless
(
exists
(
$ENV
{'
TABASE
'}));
my
$TAPROJ
;
if
(
exists
(
$ENV
{'
TAPROJ
'}))
{
$TAPROJ
=
$ENV
{'
TAPROJ
'};
}
else
{
&usage
('
environment variable TAPROJ or TABASE not set
')
unless
(
exists
(
$ENV
{'
TABASE
'}));
$TAPROJ
=
join
('
/
',
$ENV
{'
TABASE
'},
'
projects
');
}
# &usage ('no project specified') unless (defined ($project));
# &usage ('no project specified') unless (defined ($project));
unless
(
defined
(
$project
))
unless
(
defined
(
$project
))
{
{
print
"
no project specified; check these:
\n
";
print
"
no project specified; check these:
\n
";
system
(
"
ls -ls
\
"
$
ENV
{'TABASE'}/projects
\"
"
);
system
(
'
ls -ls "$
TAPROJ"
'
);
exit
(
2
);
exit
(
2
);
}
}
# &usage ('no store specified') unless (defined ($store));
# &usage ('no store specified') unless (defined ($store));
if
(
$op_mode
eq
'
edit
')
if
(
$op_mode
eq
'
edit
')
...
@@ -157,7 +171,8 @@ if ($op_mode eq 'refresh')
...
@@ -157,7 +171,8 @@ if ($op_mode eq 'refresh')
my
$store_cfg
=
$stores_p
->
{
$store
};
my
$store_cfg
=
$stores_p
->
{
$store
};
unless
(
defined
(
$store_cfg
))
unless
(
defined
(
$store_cfg
))
{
{
print
"
no store config found for '
$store
', check these:
",
Dumper
(
$stores_p
);
print
"
no store config found
",
((
$store
)
?
"
for '
$store
'
"
:
''),
"
; check these:
",
join
('
,
',
sort
keys
%$stores_p
),
"
\n
";
print
"
or use --edit to find out more
\n
";
exit
(
2
);
exit
(
2
);
}
}
...
@@ -630,9 +645,13 @@ __END__
...
@@ -630,9 +645,13 @@ __END__
locate all the stores on a given machine, so there should be an option
locate all the stores on a given machine, so there should be an option
that updates everything.
that updates everything.
* specifing the store should be optional.
* specifing the store should be optional.
* environment variable TAPROJ:
* add pod section
* allow command line option to specify alternative base directory name
* environment variable TABASE:
* environment variable TABASE:
* add pod section
* add pod section
* allow command line option to specify alternative base directory name
* allow command line option to specify alternative base directory name
* maybe a better name than TAPROJ (or even TABASE) would make sense
=head2 misc
=head2 misc
...
...
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