diff options
author | Aaron LI <aly@aaronly.me> | 2018-05-15 20:19:55 +0800 |
---|---|---|
committer | Aaron LI <aly@aaronly.me> | 2018-05-15 20:19:55 +0800 |
commit | 23e763e7f75093c3a2ad21c40ce3644984df0098 (patch) | |
tree | 8a0afda8b8eb65ce919dfc59841c0a7e7218b115 /roles/git/files/git-shell-commands/make-public | |
parent | 72e1527399880eb9800a52653fd635c968d4be35 (diff) | |
download | ansible-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/make-public')
-rw-r--r-- | roles/git/files/git-shell-commands/make-public | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/roles/git/files/git-shell-commands/make-public b/roles/git/files/git-shell-commands/make-public deleted file mode 100644 index 52546ee..0000000 --- a/roles/git/files/git-shell-commands/make-public +++ /dev/null @@ -1,37 +0,0 @@ -#!/bin/sh -# -# Copyright (c) 2017 Aaron LI <aly@aaronly.me> -# MIT License -# -# Make an existing Git repository public by linking it into -# `repos.public`, which is exported via `cgit`. -# -# 2017-06-19 -# - -. ${HOME}/vars.conf - -if [ $# -ne 1 ]; then - echo "usage: make-public <repository.git>" - exit 1 -fi - -if [ ! -e "${PUBLIC}" ]; then - echo "ERROR: public directory '${PUBLIC}' not exists!" - exit 1 -fi - -project="${1%.[gG][iI][tT]}.git" - -if [ ! -d "${HOME}/${project}" ]; then - echo "ERROR: repository '${project}' not exists!" - exit 3 -elif [ -L "${PUBLIC}/${project}" ]; then - echo "Repository '${project}' already made public." - exit 0 -else - ln -sv ../${project} ${PUBLIC}/${project} - echo "Made repository '${project}' public." - exit 0 -fi - |