aboutsummaryrefslogtreecommitdiffstats
path: root/roles/git/files/git-shell-commands/create
diff options
context:
space:
mode:
authorAaron LI <aly@aaronly.me>2018-05-15 20:19:55 +0800
committerAaron LI <aly@aaronly.me>2018-05-15 20:19:55 +0800
commit23e763e7f75093c3a2ad21c40ce3644984df0098 (patch)
tree8a0afda8b8eb65ce919dfc59841c0a7e7218b115 /roles/git/files/git-shell-commands/create
parent72e1527399880eb9800a52653fd635c968d4be35 (diff)
downloadansible-dfly-vps-23e763e7f75093c3a2ad21c40ce3644984df0098.tar.bz2
git: remove obsolete git-shell-commands files and vars.conf.j2
Diffstat (limited to 'roles/git/files/git-shell-commands/create')
-rw-r--r--roles/git/files/git-shell-commands/create42
1 files changed, 0 insertions, 42 deletions
diff --git a/roles/git/files/git-shell-commands/create b/roles/git/files/git-shell-commands/create
deleted file mode 100644
index 21cacc1..0000000
--- a/roles/git/files/git-shell-commands/create
+++ /dev/null
@@ -1,42 +0,0 @@
-#!/bin/sh
-#
-# ~/git-shell-commands/create
-#
-# An interactive command to create a new repository. The `.git` extension
-# is automatically added if missing, in order to let `list` command find
-# this repository.
-#
-# Credit:
-# * Hosting an admin-friendly git server with git-shell
-# http://planzero.org/blog/2012/10/24/hosting_an_admin-friendly_git_server_with_git-shell
-#
-# Aaron LI
-# 2017-06-18
-#
-
-if [ $# -eq 0 ]; then
- echo "Usage: create <project.git> [ description ]"
- exit 1
-fi
-
-# Set the project name, adding `.git` extension if missing
-project="${1%.[gG][iI][tT]}.git"
-shift
-
-if [ -d "${HOME}/${project}" ]; then
- echo "ERROR: repository '${project}' already exists!"
- exit 2
-fi
-
-# Create and initialise the project
-mkdir "${HOME}/${project}" && \
- cd "${HOME}/${project}" && \
- git --bare init
-
-description="$@"
-if [ -n "${description}" ]; then
- echo "${description}" > ${HOME}/${project}/description
-fi
-
-echo "Created Git repository: ${project}"
-echo "Description: $(cat ${HOME}/${project}/description)"