Merge remote branch 'agorf/git-setup'

This commit is contained in:
Tj Holowaychuk 2010-09-02 16:40:51 -07:00
commit 0147cc40b5
3 changed files with 18 additions and 22 deletions

View file

@ -1,34 +1,19 @@
PREFIX = /usr/local
BINS = \
git-count \
git-ignore \
git-changelog \
git-delete-branch \
git-delete-tag \
git-fresh-branch \
git-graft \
git-repl \
git-commits-since \
git-summary \
git-contrib \
git-update-extras \
git-extras-version \
git-release \
git-undo
BINS = $(wildcard bin/git-*)
install:
@echo "... installing to $(PREFIX)/bin"
@$(foreach BIN, $(BINS), \
echo "... installing $(BIN)"; \
cp -f bin/$(BIN) $(PREFIX)/bin/$(BIN); \
echo "... installing `basename $(BIN)`"; \
cp -f $(BIN) $(PREFIX)/$(BIN); \
)
uninstall:
@$(foreach BIN, $(BINS), \
echo "... uninstalling $(PREFIX)/bin/$(BIN)"; \
rm -f $(PREFIX)/bin/$(BIN); \
echo "... uninstalling $(PREFIX)/$(BIN)"; \
rm -f $(PREFIX)/$(BIN); \
)
.PHONY: install uninstall
.PHONY: install uninstall

View file

@ -23,6 +23,7 @@
- git repl
- git undo
- git update-extras
- git setup
## git-contrib
@ -228,4 +229,8 @@ Remove the latest 3 commits:
## git-update-extras
Updates git extras. clones the repo to _/tmp/git-extras_, make installs, then cds back to the origin directory.
Updates git extras. clones the repo to _/tmp/git-extras_, make installs, then cds back to the origin directory.
## git-setup
Set up a git repository if one doesn't exist, add all files and make an initial commit.

6
bin/git-setup Executable file
View file

@ -0,0 +1,6 @@
#!/bin/sh
test -z "$1" && echo "path required." && exit 1
cd "$1"
test -d .git && exit
git init && git add . && git commit -m 'Initial commit'