From 23e763e7f75093c3a2ad21c40ce3644984df0098 Mon Sep 17 00:00:00 2001 From: Aaron LI Date: Tue, 15 May 2018 20:19:55 +0800 Subject: git: remove obsolete git-shell-commands files and vars.conf.j2 --- roles/git/files/git-shell-commands/make-public | 37 -------------------------- 1 file changed, 37 deletions(-) delete mode 100644 roles/git/files/git-shell-commands/make-public (limited to 'roles/git/files/git-shell-commands/make-public') 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 -# 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 " - 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 - -- cgit v1.2.2