commit 3e2e2271e18a07bd70d24817b80db728d99bb272
parent daa254c0e96ad9f1c3e69359118988e989c3fe59
Author: Tyler Clark <tyler.clark@foxide.xyz>
Date: Sun, 9 Feb 2025 21:47:07 -0500
Implementing flag for not having a description
Diffstat:
1 file changed, 11 insertions(+), 7 deletions(-)
diff --git a/scripts/NewRepo.sh b/scripts/NewRepo.sh
@@ -4,8 +4,8 @@
#
# The process should look like:
# 1. DONE Create ${REPO}
-# 2. TODO Set description for ${REPO}, unless flag is set to skip
-# 3. TODO Create main.md for ${REPO}, unless flag is set to skip
+# 2. DONE Set description for ${REPO}, unless flag is set to skip
+# 3. TODO Create README.md for ${REPO}, unless flag is set to skip
# 4. TODO Implement 'template' repos
# 5. HOLD Copy license file to ${REPO}, unless flag is set to skip
@@ -19,7 +19,8 @@ help()
createRepo()
{
if [ ${TEMPLATE} = 1 ] && [ ${PRIVATE} = 1 ]; then
- EXT=.private.template
+ echo "Note: Behavior of private templates and regular templates are identical."
+ EXT=.template
break
elif [ ${PRIVATE} = 1 ]; then
EXT=.private
@@ -32,8 +33,11 @@ createRepo()
break
fi
- git init --bare ${REPODIR}/${EXT}
- ${EDITOR} ${REPODIR}/${EXT/description}
+ git init --bare ${REPODIR}.${EXT}
+
+ if [ ${NO_DESC} != 1]; then
+ ${EDITOR} ${REPODIR}.${EXT}/description
+ fi
}
@@ -41,9 +45,9 @@ if [ "$#" -eq 0 ]; then
help
fi
-while getopts ":hptn:" f; do
+while getopts ":Dhptn:" f; do
case $f in
- #n) echo "Dir name: ${OPTARG}.git";;
+ D) NO_DESC=1;;
n) NAME=${OPTARG};;
p) PRIVATE=1;;
t) TEMPLATE=1;;