From 1fc7d00b82a80ede647ce69d239a9dcf7f7930c0 Mon Sep 17 00:00:00 2001 From: William Brawner Date: Thu, 16 Sep 2021 21:35:16 -0600 Subject: [PATCH] Remove .git suffix from repos Signed-off-by: William Brawner --- delete | 4 ++-- edit-description | 4 ++-- new | 6 +++--- rename | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/delete b/delete index 9f85e25..0d2178f 100755 --- a/delete +++ b/delete @@ -7,11 +7,11 @@ if [[ -z "$1" ]]; then exit 1 fi -if [[ ! -d "$1.git" ]]; then +if [[ ! -d "$1" ]]; then echo "Repo $1 doesn't exist" exit 1 fi -rm -rf "$1.git" +rm -rf "$1" echo "Successfully deleted repository $1" diff --git a/edit-description b/edit-description index 03752ba..81d2e47 100755 --- a/edit-description +++ b/edit-description @@ -7,10 +7,10 @@ if [[ -z "$1" ]]; then exit 1 fi -if [[ ! -d "$1.git" ]]; then +if [[ ! -d "$1" ]]; then echo "Repo $1 doesn't exist" exit 1 fi -vim "$1.git/description" +vim "$1/description" diff --git a/new b/new index a3fb408..01e2984 100755 --- a/new +++ b/new @@ -7,12 +7,12 @@ if [[ -z "$1" ]]; then exit 1 fi -if [[ -d "$1.git" ]]; then +if [[ -d "$1" ]]; then echo "Repo $1 already exists" exit 1 fi -/usr/bin/git init --bare "$1.git" -/usr/bin/git -C "$1.git" config http.receivepack true +/usr/bin/git init --bare "$1" +/usr/bin/git -C "$1" config http.receivepack true echo "Successfully created repository $1" diff --git a/rename b/rename index 1a5a8be..72ef4b6 100755 --- a/rename +++ b/rename @@ -10,11 +10,11 @@ if [[ -z "$2" ]]; then exit 1 fi -if [[ -d "$2.git" ]]; then +if [[ -d "$2" ]]; then echo "Repo $2 already exists" exit 1 fi -mv "$1.git" "$2.git" +mv "$1" "$2" echo "Successfully renamed repository $1 to $2"