CmdVersion: Uses libshared osName
This commit is contained in:
@@ -33,6 +33,7 @@
|
|||||||
#ifdef HAVE_COMMIT
|
#ifdef HAVE_COMMIT
|
||||||
#include <commit.h>
|
#include <commit.h>
|
||||||
#endif
|
#endif
|
||||||
|
#include <shared.h>
|
||||||
#include <format.h>
|
#include <format.h>
|
||||||
#include <i18n.h>
|
#include <i18n.h>
|
||||||
|
|
||||||
@@ -78,30 +79,7 @@ int CmdVersion::execute (std::string& output)
|
|||||||
|
|
||||||
out << '\n'
|
out << '\n'
|
||||||
<< format ("{1} {2} built for ", bold.colorize (PACKAGE), bold.colorize (VERSION))
|
<< format ("{1} {2} built for ", bold.colorize (PACKAGE), bold.colorize (VERSION))
|
||||||
|
<< osName ()
|
||||||
#if defined (DARWIN)
|
|
||||||
<< "darwin"
|
|
||||||
#elif defined (SOLARIS)
|
|
||||||
<< "solaris"
|
|
||||||
#elif defined (CYGWIN)
|
|
||||||
<< "cygwin"
|
|
||||||
#elif defined (HAIKU)
|
|
||||||
<< "haiku"
|
|
||||||
#elif defined (OPENBSD)
|
|
||||||
<< "openbsd"
|
|
||||||
#elif defined (FREEBSD)
|
|
||||||
<< "freebsd"
|
|
||||||
#elif defined (NETBSD)
|
|
||||||
<< "netbsd"
|
|
||||||
#elif defined (LINUX)
|
|
||||||
<< "linux"
|
|
||||||
#elif defined (KFREEBSD)
|
|
||||||
<< "gnu-kfreebsd"
|
|
||||||
#elif defined (GNUHURD)
|
|
||||||
<< "gnu-hurd"
|
|
||||||
#else
|
|
||||||
<< STRING_CMD_VERSION_UNKNOWN
|
|
||||||
#endif
|
|
||||||
<< '\n'
|
<< '\n'
|
||||||
<< "Copyright (C) 2006 - 2018 P. Beckingham, F. Hernandez."
|
<< "Copyright (C) 2006 - 2018 P. Beckingham, F. Hernandez."
|
||||||
<< '\n'
|
<< '\n'
|
||||||
|
|||||||
Reference in New Issue
Block a user