From 63dd34e926b3f25b6e22f37177aeb2254df7aee6 Mon Sep 17 00:00:00 2001 From: Bob Polis Date: Tue, 31 Dec 2024 14:32:05 +0100 Subject: [PATCH] Add -n option for normal project type For consistency, I added this option, so any project type can be explicitly specified. Of course, this option is the default, so it can be left out to yield the existing behaviour. --- mkproj.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/mkproj.sh b/mkproj.sh index f4d09b7..cda9577 100644 --- a/mkproj.sh +++ b/mkproj.sh @@ -10,7 +10,7 @@ simple=0 usegitroot=0 usage() { - echo "usage: $progname [-f|-l|-s] [[-d] -g |-G] [-t ] PROJECTNAME" >&2 + echo "usage: $progname [-f|-l|-n|-s] [[-d] -g |-G] [-t ] PROJECTNAME" >&2 exit 1 } @@ -30,7 +30,7 @@ check_gitroot() { progname=${0##*/} # option processing, using silent mode -while getopts :dfGg:lst:v opt +while getopts :dfGg:lnst:v opt do case $opt in d) @@ -49,6 +49,11 @@ do l) library=1 ;; + n) + mainfile=main.cpp + library=0 + simple=0 + ;; s) simple=1 ;;