Makefile (829B)
1 # Minimal Git repository management. 2 3 SHELL = /bin/sh 4 5 SCRIPT = ./git-host.sh 6 7 NAME ?= 8 DESC ?= No description 9 OWNER ?= cowmonk 10 URL ?= https://git.daat.foo/$(NAME).git 11 SRC ?= 12 13 .PHONY: new import build index all help 14 15 new: 16 @test -n "$(NAME)" || { echo "NAME required"; exit 1; } 17 @$(SCRIPT) new "$(NAME)" "$(DESC)" "$(OWNER)" "$(URL)" 18 19 import: 20 @test -n "$(NAME)" && test -n "$(SRC)" || \ 21 { echo "NAME and SRC required"; exit 1; } 22 @$(SCRIPT) import "$(NAME)" "$(SRC)" "$(DESC)" "$(OWNER)" "$(URL)" 23 24 build: 25 @test -n "$(NAME)" || { echo "NAME required"; exit 1; } 26 @$(SCRIPT) build "$(NAME)" 27 28 index: 29 @$(SCRIPT) index 30 31 all: 32 @$(SCRIPT) all 33 34 help: 35 @echo "make new NAME=foo DESC='My project'" 36 @echo "make import NAME=foo SRC=https://example.com/foo.git" 37 @echo "make build NAME=foo" 38 @echo "make index" 39 @echo "make all" 40