wip
This commit is contained in:
71
proj.c
71
proj.c
@@ -13,26 +13,31 @@
|
||||
#include "input.h"
|
||||
#include "proj.h"
|
||||
#include "usage.h"
|
||||
#include "util.h"
|
||||
#include "version.h"
|
||||
|
||||
int makeproj(char *src)
|
||||
{
|
||||
int makeproj(char *src) {
|
||||
if (ffexist(src))
|
||||
die("%s already exists", src);
|
||||
|
||||
fmkdir(src);
|
||||
if (chdir(src))
|
||||
die("could not cd into %s", src);
|
||||
die("could not cd into %s", src);
|
||||
|
||||
int year = getyear();
|
||||
char *author = getstring("Author");
|
||||
char *description = getstring("Description");
|
||||
|
||||
ffwrite("main.c", "\
|
||||
/*\n\
|
||||
* main.c\n\
|
||||
*\n\
|
||||
* package/Author 1.0\n\
|
||||
* %s/%s 1.0\n\
|
||||
*\n\
|
||||
* Copying policy\n\
|
||||
*\n\
|
||||
* yait 1.0 can be copied and distributed freely for any\n\
|
||||
* non-commercial purposes. yait 1.0 can only be incorporated\n\
|
||||
* %s 1.0 can be copied and distributed freely for any\n\
|
||||
* non-commercial purposes. %s 1.0 can only be incorporated\n\
|
||||
* into commercial software with the permission of the current author.\n\
|
||||
*\n\
|
||||
* This file contains the main driving routine.\n\
|
||||
@@ -70,5 +75,59 @@ int main(int argc, char **argv)\n\
|
||||
return 0;\n\
|
||||
}");
|
||||
|
||||
ffwrite("README", "\
|
||||
+%%s+\n\
|
||||
| %%s |\n\
|
||||
+%%s+\n\
|
||||
\n\
|
||||
%s\n\
|
||||
\n\
|
||||
%s was written by %s\n\
|
||||
\n\
|
||||
Copyright Notices:\n\
|
||||
\n\
|
||||
%s 1.0 (c) Copyright %d %s\n\
|
||||
\n\
|
||||
Reference the COPYING file for detailed information\n\
|
||||
\n\
|
||||
\n\
|
||||
WHAT IS %s/%s?\n\
|
||||
\n\
|
||||
%s/%s 1.0 %s\n\
|
||||
\n\
|
||||
\n\
|
||||
WHAT IS NEW\n\
|
||||
\n\
|
||||
Features:\n\
|
||||
\n\
|
||||
o This is the first version, EVERYTHING is new!\n\
|
||||
\n\
|
||||
Bug fixes - not very interesting:\n\
|
||||
\n\
|
||||
o None\n\
|
||||
\n\
|
||||
Something is gone:\n\
|
||||
\n\
|
||||
o None\n\
|
||||
\n\
|
||||
HOW TO INSTALL %s/%s?\n\
|
||||
\n\
|
||||
o UNIX: Look at estruct.h, do a 'make', test the program, 'make install'.\n\
|
||||
\n\
|
||||
\n\
|
||||
ACKNOWLEDGEMENTS AND STATUS\n\
|
||||
\n\
|
||||
This project's file strucutre, file format, and certain contents are\n\
|
||||
derived from uEmacs/PK 4.0 specifically from the Linux Torvalds\n\
|
||||
distribution on GitHub. The README on from uEmacs/PK 4.0 has greater and\n\
|
||||
more accurate attributions, if you desire.\n\
|
||||
\n\
|
||||
%s was generated using yait/fSD %s.\n\
|
||||
\n\
|
||||
LAST MODIFED DATE\
|
||||
",
|
||||
description, src, author, src, year, author, src, author, src, author,
|
||||
description, src, author, VERSION);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user