Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
cta
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Harbor Registry
Model registry
Operate
Environments
Terraform modules
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
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
dCache
cta
Commits
5cda9ec6
Commit
5cda9ec6
authored
6 years ago
by
Giuseppe Lo Presti
Browse files
Options
Downloads
Patches
Plain Diff
Added an "Easter egg": the legacy castor version command line :)
parent
904d80fb
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
cmdline/CMakeLists.txt
+4
-0
4 additions, 0 deletions
cmdline/CMakeLists.txt
cmdline/castor.c
+42
-0
42 additions, 0 deletions
cmdline/castor.c
with
46 additions
and
0 deletions
cmdline/CMakeLists.txt
+
4
−
0
View file @
5cda9ec6
...
...
@@ -47,7 +47,11 @@ add_executable(cta-wfe-test EosCtaStub.cpp)
target_link_libraries
(
cta-wfe-test cryptopp ctacommon XrdSsiPbEosCta XrdSsi-4 XrdSsiLib XrdUtils
)
set_property
(
TARGET cta-wfe-test APPEND PROPERTY INSTALL_RPATH
${
PROTOBUF3_RPATH
}
)
# Easter egg: the castor version tool
add_executable
(
castor castor.c
)
install
(
TARGETS cta-admin DESTINATION usr/bin
)
install
(
TARGETS cta-wfe-test DESTINATION usr/bin
)
install
(
FILES cta-cli.conf DESTINATION
${
CMAKE_INSTALL_SYSCONFDIR
}
/cta
)
install
(
TARGETS castor DESTINATION usr/bin
)
This diff is collapsed.
Click to expand it.
cmdline/castor.c
0 → 100644
+
42
−
0
View file @
5cda9ec6
/*!
* @project The CERN Tape Archive (CTA)
* @brief Command-line tool for CTA Admin commands
* @description CTA Admin command using Google Protocol Buffers and XRootD SSI transport
* @copyright Copyright 2017 CERN
* @license This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/* This is an "Easter egg": the former castor version tool */
#include
<stdlib.h>
#include
<stdio.h>
#include
<unistd.h>
#include
"version.h"
int
main
(
int
argc
,
char
**
argv
)
{
int
c
;
while
((
c
=
getopt
(
argc
,
argv
,
"hv"
))
!=
EOF
)
{
switch
(
c
)
{
case
'v'
:
printf
(
"CASTOR 3.0 - CTA %s
\n
"
,
CTA_VERSION
);
break
;
case
'h'
:
default:
printf
(
"usage : %s [-v] [-h]
\n
"
,
argv
[
0
]);
break
;
}
}
exit
(
0
);
}
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