added nuke util, C++ 20 build
This commit is contained in:
parent
ab4fb231e5
commit
abf59acb97
4 changed files with 9 additions and 3 deletions
2
cat.c
2
cat.c
|
@ -13,7 +13,7 @@ return 0;
|
||||||
}
|
}
|
||||||
if(strcmp(argv[1],"-v")==0)
|
if(strcmp(argv[1],"-v")==0)
|
||||||
{
|
{
|
||||||
printf("patricus utils, version %s",version);
|
printf("patricus utils, version %s",VERSION);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
for(int meowing=1;meowing<argc;meowing++){
|
for(int meowing=1;meowing<argc;meowing++){
|
||||||
|
|
|
@ -11,7 +11,7 @@ int main(int argc, char *argv[]) {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
else if(strcmp("-v", argv[1]) == 0) {
|
else if(strcmp("-v", argv[1]) == 0) {
|
||||||
printf("patricus utils, version %s", version);
|
printf("patricus utils, version %s", VERSION);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
else if(argc == 2) {
|
else if(argc == 2) {
|
||||||
|
|
|
@ -9,7 +9,7 @@ else
|
||||||
endif
|
endif
|
||||||
|
|
||||||
conf = configuration_data()
|
conf = configuration_data()
|
||||||
conf.set('version', '"@0@"'.format(full_version))
|
conf.set('VERSION', '"@0@"'.format(full_version))
|
||||||
|
|
||||||
configure_file(
|
configure_file(
|
||||||
output: 'version.h',
|
output: 'version.h',
|
||||||
|
|
6
nuke.cpp
6
nuke.cpp
|
@ -1,9 +1,15 @@
|
||||||
|
#include<version.h>
|
||||||
|
#include<string>
|
||||||
#include<filesystem>
|
#include<filesystem>
|
||||||
#include<iostream>
|
#include<iostream>
|
||||||
using namespace std;
|
using namespace std;
|
||||||
int main(int argc, char* argv[])
|
int main(int argc, char* argv[])
|
||||||
{
|
{
|
||||||
for(int i=1;i<argc;i++){
|
for(int i=1;i<argc;i++){
|
||||||
|
if (string(argv[i]) == "-v")
|
||||||
|
{
|
||||||
|
cout<<"patricus utils, version "+string(VERSION);
|
||||||
|
}
|
||||||
if(!filesystem::exists(argv[i]))
|
if(!filesystem::exists(argv[i]))
|
||||||
{
|
{
|
||||||
cerr<<"error, no such file or directory";
|
cerr<<"error, no such file or directory";
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue