--- /dev/null
+#!/bin/bash
+#
+# What: mkrepo
+# Date: 27 Sept 2024
+# Author: Christian Goeschel Ndjomouo (cgoesc2@wgu.edu)
+# Description: Create an empty git repository
+
+# -------------------------------------------------------------
+# Global variables
+
+declare -r GIT_DIR="/srv/git"
+declare -r REPO_NAME
+declare -r ERR_MSG
+
+function create_repo() {
+
+ if [[ -d "${GIT_DIR}/${REPO_NAME}" ]]; then
+ ERR_MSG="Repo ${REPO_NAME} already exists"
+ return 1
+ fi
+
+ /usr/bin/mkdir -p "${GIT_DIR}/${REPO_NAME}" &&
+ cd ${GIT_DIR}/${REPO_NAME} &&
+ git init --bare
+
+ if [[ "${?}" != "0" ]]; then
+ ERR_MSG="Could not create repo ${REPO_NAME}"
+ return 1
+ fi
+
+ return 0
+}
+
+function main() {
+
+ if [[ -z "${1}" ]]; then
+ echo "The repository name cannot be an empty string!"
+ exit 1
+ fi
+ REPO_NAME="${1}.git"
+
+ create_repo
+ if [[ "${?}" != "" ]]; then
+ echo "${ERR_MSG}"
+ exit 1
+ fi
+
+ exit 0
+}
+
+main ${@}