rewrite complete #1

Merged
vx-clutch merged 20 commits from rewrite into main 2026-01-14 20:39:15 -05:00
Showing only changes of commit deca2349cf - Show all commits

View File

@@ -1,7 +1,7 @@
#! /bin/sh
# Highly opinionated C and SH project generator
scriptversion="0.1.1"
scriptversion="0.2.1"
#
# Copyright (C) 2025-2026 fSD THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
@@ -65,8 +65,14 @@ create_project() {
outfile="$name"
if [ -z "$S" ]; then
mkdir "$name" || return
cd "$name" || return
if [ -d "$name" ]; then
if ! [ -z "$f" ]; then
rm -rf "$name"
fi
fi
mkdir "$name" || exit 1
cd "$name" || exit 1
cat <<EOF > LICENSE
ISC License
@@ -130,7 +136,7 @@ This tool runs via the command \`$name\`.
- \`$name -k\` -- Does option k
EOF
mkdir bin || return
mkdir bin || exit 1
outfile="bin/$outfile"
fi
cat <<EOF > "$outfile"
@@ -194,8 +200,13 @@ EOF
}
c() {
mkdir "$name" || return
cd "$name" || return
if [ -d "$name" ]; then
if ! [ -z "$f" ]; then
rm -rf "$name"
fi
fi
mkdir "$name" || exit 1
cd "$name" || exit 1
cat <<EOF > README
$name
$(echo "$name" | sed 's/./=/g')