Compare commits
2 Commits
fc3d0a2e69
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| cf5751840a | |||
| 5133045b31 |
9
bin/yait
9
bin/yait
@@ -1,7 +1,7 @@
|
|||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
# Highly opinionated C and SH project generator
|
# Highly opinionated C and SH project generator
|
||||||
|
|
||||||
scriptversion="0.2.1"
|
scriptversion="0.3.1"
|
||||||
|
|
||||||
#
|
#
|
||||||
# Copyright (C) 2025-2026 fSD THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
# Copyright (C) 2025-2026 fSD THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
@@ -31,7 +31,7 @@ Options:
|
|||||||
-f overwrite existing files
|
-f overwrite existing files
|
||||||
-a <author> set project author
|
-a <author> set project author
|
||||||
-r initialize Git repository for the project
|
-r initialize Git repository for the project
|
||||||
-q surpress output"
|
-q suppress output"
|
||||||
|
|
||||||
x=c # language
|
x=c # language
|
||||||
d="Does a thing" # package description
|
d="Does a thing" # package description
|
||||||
@@ -53,6 +53,7 @@ lsay() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# main creation routine
|
||||||
create_project() {
|
create_project() {
|
||||||
name=$1
|
name=$1
|
||||||
|
|
||||||
@@ -61,6 +62,7 @@ create_project() {
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# creates a shell project
|
||||||
shell() {
|
shell() {
|
||||||
outfile="$name"
|
outfile="$name"
|
||||||
|
|
||||||
@@ -199,6 +201,7 @@ EOF
|
|||||||
chmod +x "$outfile"
|
chmod +x "$outfile"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# creates a C project
|
||||||
c() {
|
c() {
|
||||||
if [ -d "$name" ]; then
|
if [ -d "$name" ]; then
|
||||||
if ! [ -z "$f" ]; then
|
if ! [ -z "$f" ]; then
|
||||||
@@ -275,7 +278,7 @@ all: $name
|
|||||||
config.h:
|
config.h:
|
||||||
cp config.def.h \$@
|
cp config.def.h \$@
|
||||||
|
|
||||||
dwm: \${OBJ}
|
$name: \${OBJ}
|
||||||
\${CC} -o \$@ \${OBJ} \${LDFLAGS}
|
\${CC} -o \$@ \${OBJ} \${LDFLAGS}
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
|
|||||||
Reference in New Issue
Block a user