MinimalistGit

Project to automate creating git repos on a minimal 'git daemon' server.
Log | Files | Refs | README | LICENSE

commit dfc8b43d78e108849dd94d8d2e36e2a280d74e78
parent d4441f3efab8de9119b3a11b338662b4d6d6f0a9
Author: Tyler Clark <tyler.clark@foxide.xyz>
Date:   Sun,  9 Feb 2025 21:47:07 -0500

Worked on how user will interact with script when no arguments are given

Diffstat:
Mscripts/DeleteRepo.sh | 16+++++++++++-----
1 file changed, 11 insertions(+), 5 deletions(-)

diff --git a/scripts/DeleteRepo.sh b/scripts/DeleteRepo.sh @@ -9,6 +9,9 @@ # I should come up with some sort of confirmation for deleting the repo as well +REPODIR="../Repos" +FZF=0 + help() { echo "-h: Prints this help menu" @@ -18,15 +21,18 @@ help() deleteRepo() { - for i in $( ls ); do - echo "$i" + echo "Which repo would you like to delete?" + NUM=1 + for i in $( ls ${REPODIR} ); do + echo "${NUM}: $i" + NUM=$(expr ${NUM} + 1) done + read INPUT + echo ${INPUT} } if [ "$#" -eq 0 ]; then - for i in $( ls -d [*git,*private,*template] ); do - echo "$i" - done + deleteRepo fi while getopts ":hzn:" f; do