Commit adaafeb7 authored by Giuseppe Lo Presti's avatar Giuseppe Lo Presti
Browse files

Added an "Easter egg": the legacy castor version command line :)

parent 6df83539
......@@ -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)
/*!
* @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);
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment