mirror of
https://github.com/tj/git-extras.git
synced 2026-09-10 23:46:24 -04:00
Merge remote branch 'agorf/git-setup'
This commit is contained in:
commit
0147cc40b5
27
Makefile
27
Makefile
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
6
bin/git-setup
Executable 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'
|
||||
Loading…
Reference in a new issue