fixes
This commit is contained in:
21
src/yait.c
21
src/yait.c
@@ -26,6 +26,10 @@
|
||||
#include "version.h"
|
||||
#include <template.h>
|
||||
|
||||
#ifndef GOOD
|
||||
#define GOOD 0
|
||||
#endif
|
||||
|
||||
typedef enum { MIT, GPL, BSD, UNL } license_t;
|
||||
|
||||
static const struct option longopts[] = {
|
||||
@@ -96,11 +100,12 @@ int main(int argc, char **argv)
|
||||
{
|
||||
int optc;
|
||||
int lose = 0;
|
||||
char *m = str_dup("Does a thing"), *package;
|
||||
bool shell = false;
|
||||
bool flat = false;
|
||||
char *m = str_dup("[DESCRIPTION]"), /* description flag */
|
||||
*package;
|
||||
bool S = false; /* shell flag */
|
||||
bool f = false; /* flat flag */
|
||||
char *author = get_name();
|
||||
exit_status = EXIT_SUCCESS;
|
||||
exit_status = GOOD;
|
||||
int year = get_year();
|
||||
license_t license = BSD;
|
||||
char *license_str = "BSD-3-Clause";
|
||||
@@ -148,10 +153,10 @@ int main(int argc, char **argv)
|
||||
}
|
||||
break;
|
||||
case 'S':
|
||||
shell = true;
|
||||
S = true;
|
||||
break;
|
||||
case 'f':
|
||||
flat = true;
|
||||
f = true;
|
||||
break;
|
||||
default:
|
||||
lose = 1;
|
||||
@@ -171,7 +176,7 @@ int main(int argc, char **argv)
|
||||
|
||||
package = str_dup(argv[optind]);
|
||||
|
||||
if (shell)
|
||||
if (S)
|
||||
return write_shell(package, license_str, year, author, m);
|
||||
|
||||
char *project_dir;
|
||||
@@ -199,7 +204,7 @@ int main(int argc, char **argv)
|
||||
fs_write("README", templ_README, author, package, package, m, year,
|
||||
package, author, package);
|
||||
|
||||
if (flat)
|
||||
if (f)
|
||||
exit_status =
|
||||
generate_flat(package, author, year, license_str, m);
|
||||
// else
|
||||
|
||||
Reference in New Issue
Block a user