This commit is contained in:
2025-11-10 21:54:10 -05:00
parent bfefb223f1
commit 1c9d62dabf
10 changed files with 172 additions and 41 deletions

22
shell.c
View File

@@ -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)