commit d4441f3efab8de9119b3a11b338662b4d6d6f0a9
parent 32a746be00c833650be60a7ac9d0cba2d370568c
Author: Tyler Clark <tyler.clark@foxide.xyz>
Date: Sun, 9 Feb 2025 21:47:07 -0500
Fixing variable issues causing errors when using flags to create repos
Diffstat:
1 file changed, 12 insertions(+), 4 deletions(-)
diff --git a/scripts/NewRepo.sh b/scripts/NewRepo.sh
@@ -6,6 +6,10 @@
# while the private repos will have a .private extension and the template repos will have a .template extension.
# If a repo is public and a template it will have .git.template.
+REPODIR="../Repos"
+TEMPLATE=0
+PRIVATE=0
+
help()
{
#echo "Usage: "
@@ -44,13 +48,17 @@ repoQuestions()
createRepo()
{
if [ ${TEMPLATE} = 1 ] && [ ${PRIVATE} = 1 ]; then
- mkdir ${NAME}.private.template
+ mkdir ${REPODIR}/${NAME}.private.template
+ break
elif [ ${PRIVATE} = 1 ]; then
- mkdir ${NAME}.private
+ mkdir ${REPODIR}/${NAME}.private
+ break
elif [ ${TEMPLATE} = 1 ]; then
- mkdir ${NAME}.template
+ mkdir ${REPODIR}/${NAME}.template
+ break
else
- mkdir ${NAME}.git
+ mkdir ${REPODIR}/${NAME}.git
+ break
fi
exit