wip
This commit is contained in:
22
shell.c
22
shell.c
@@ -11,18 +11,25 @@
|
||||
|
||||
#include "estruct.h"
|
||||
#include "file.h"
|
||||
#include "full.h"
|
||||
#include "globals.h"
|
||||
#include "input.h"
|
||||
#include "shell.h"
|
||||
#include "single.h"
|
||||
#include "usage.h"
|
||||
|
||||
int makeshell(char *src)
|
||||
{
|
||||
if (ffexist(src))
|
||||
die("%s already exists", src);
|
||||
|
||||
int makeshell(char *src, int complexity) {
|
||||
char *license = LICENSE;
|
||||
|
||||
if (complexity == SINGLE)
|
||||
single_init(src);
|
||||
else if (complexity == FULL)
|
||||
full_project_init_and_cd(src);
|
||||
else
|
||||
die("invalid state! shell.c:%d", __LINE__);
|
||||
|
||||
if (!QLICENSE)
|
||||
license = getstring("License");
|
||||
license = getstring("License");
|
||||
char *description = getstring("Description");
|
||||
|
||||
ffwrite(src, "\
|
||||
@@ -58,7 +65,8 @@ while [ $# -gt 0 ]; do\n\
|
||||
exit 1 ;;\n\
|
||||
esac\n\
|
||||
shift\n\
|
||||
done", license, description, 2025, "fSD", description);
|
||||
done",
|
||||
license, description, 2025, "fSD", description);
|
||||
|
||||
struct stat st;
|
||||
if (stat(src, &st) == 0)
|
||||
|
||||
Reference in New Issue
Block a user