commit 849351ebd41734a6b039670087f12495032e3ba4
parent a4d67cb9e6d47154d3c0645f290fb0e95d1e0f04
Author: Tyler Clark <tyler.clark@foxide.xyz>
Date: Sun, 6 Apr 2025 18:52:56 -0400
Restructuring script
Diffstat:
2 files changed, 13 insertions(+), 23 deletions(-)
diff --git a/new-repo.sh b/new-repo.sh
@@ -1,18 +0,0 @@
-#!/bin/sh
-
-# This shell script creates a new git repo to make things easier.
-
-echo "What is the name of the new repository?"
-read NAME
-mkdir /usr/local/www/git/${NAME}
-cd /usr/local/www/git/${NAME}
-git init --bare
-mv ./hooks/post-update.sample ./hooks/post-update
-echo "exec /home/git/run.sh" > ./hooks/post-update
-vim description
-
-# Reload git so repo is available
-# The below are no longer necessary as there is a git_daemon service now
-#killall git-daemon
-#git daemon --reuseaddr --base-path=/usr/local/www/git --export-all --enable=receive-pack /usr/local/www/git/* &
-echo "Restart the git_daemon service"
diff --git a/scripts/DeleteRepo.sh b/scripts/DeleteRepo.sh
@@ -9,18 +9,19 @@
# I should come up with some sort of confirmation for deleting the repo as well
-REPODIR="./repos"
+REPODIR="/usr/local/www/git"
FZF=0
-NAME=""
help()
{
echo "-h: Prints this help menu"
echo "-n: Name of repository to be deleted"
- echo "-z: Enables FZF support for selecting repo, must have fzf installed"
+ echo "-z: Enables FZF support for selecting repo, must have fzf installed (not implemented yet)"
+
+ exit 0;
}
-deleteRepo()
+repoSelect()
{
if [ -z ${NAME} ]; then
rm -r ${REPODIR}/${NAME}.git
@@ -36,8 +37,15 @@ deleteRepo()
echo ${INPUT}
}
+deleteRepo()
+{
+ EXT=".git"
+ rm -rf ${REPODIR}/${NAME}${EXT}
+ /usr/local/bin/stagit-index /usr/local/www/git/*git > /usr/local/www/git/index.html
+}
+
if [ "$#" -eq 0 ]; then
- deleteRepo
+ help
fi
while getopts ":hzn:" f; do