commit 2ac74f83bc35259470a81568ff98b0cc4568ff04
parent 54406961bbfa35bdaaa3e9fb545b0960ce89ae6e
Author: Tyler Clark <tyler.clark@foxide.xyz>
Date: Sun, 9 Feb 2025 21:47:07 -0500
Adding entry for new script, and some work on the NewRepo script
Diffstat:
3 files changed, 49 insertions(+), 28 deletions(-)
diff --git a/NewRepo.sh b/NewRepo.sh
@@ -1,28 +0,0 @@
-#!/bin/sh
-# This script will automate the creation of Git repositories
-# The arguments available for this script are:
-#
-# -h, --help: Prints a help screen
-# -t, --template: makes this a template repository
-# -n, --name: The name of the repository (will create a directory with this name)
-# -p, --private: make this repository a private repository (will not appear in web interface)
-
-for i in "$@"; do
- case $i in
- -h|--help)
- echo "Help menu"
- ;;
- -n|--name)
- echo "Dir name: $2"
- shift
- ;;
- --default)
- DEFAULT=YES
- echo "No arguments passed"
- shift
- ;;
- *)
- echo "Something went wrong"
- ;;
- esac
- done
diff --git a/scripts/DeleteRepo.sh b/scripts/DeleteRepo.sh
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+# This script will automate the removal of git repositories
+# arguments available for this script are:
+
+# -h, --help: Prints a help scree
+# -n, --name: The name of the repo to delete
diff --git a/scripts/NewRepo.sh b/scripts/NewRepo.sh
@@ -0,0 +1,42 @@
+#!/bin/sh
+# This script will automate the creation of Git repositories
+# The arguments available for this script are:
+#
+# -h, --help: Prints a help screen
+# -t, --template: makes this a template repository
+# -n, --name: The name of the repository (will create a directory with this name)
+# -p, --private: make this repository a private repository (will not appear in web interface)
+
+help()
+{
+ #echo "Usage: "
+ echo "-h, --help: Prints this help menu"
+ echo "-n, --name value: Gives repository name of value"
+ echo "-p, --private: Makes the repository private"
+ echo "-t, --template: Makes the repository a template repository"
+}
+
+while $# -gt 0; do
+ case $i in
+ -h|--help)
+ help
+ break
+ ;;
+ -n|--name)
+ DIRNAME=${i}.git
+ echo "Dir name: ${DIRNAME}"
+ shift
+ shift
+ ;;
+ -p|--private)
+ echo "${DIRNAME} will be a private repo"
+ ;;
+ -t|--template)
+ echo "${DIRNAME} will be a template repo"
+ ;;
+ *)
+ echo "No arguments passed"
+ ;;
+ esac
+done
+