Remove .git suffix from repos
Signed-off-by: William Brawner <me@wbrawner.com>
This commit is contained in:
parent
5c1487694f
commit
1fc7d00b82
4 changed files with 9 additions and 9 deletions
4
delete
4
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"
|
||||
|
||||
|
|
|
@ -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"
|
||||
|
||||
|
|
6
new
6
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"
|
||||
|
||||
|
|
4
rename
4
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"
|
||||
|
||||
|
|
Loading…
Reference in a new issue