Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Portable msysgit #406

Merged
merged 4 commits into from
Jul 29, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions Makefile.msys
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
MANPREFIX ?= /doc/git/html
BINS = $(wildcard bin/git-*)
MANS = $(wildcard man/git-*.md)
MAN_HTML = $(MANS:.md=.html)

install:
@mkdir -p $(DESTDIR)$(MANPREFIX)
@mkdir -p $(DESTDIR)/bin
@echo "... installing bins to $(DESTDIR)/bin"
@echo "... installing man pages to $(DESTDIR)$(MANPREFIX)"
@$(foreach BIN, $(BINS), \
echo "... installing `basename $(BIN)`"; \
cp -f $(BIN) $(DESTDIR)/$(BIN); \
)
cp -f man/git-*.html $(DESTDIR)$(MANPREFIX)
@mkdir -p $(DESTDIR)/etc/bash_completion.d
cp -f etc/bash_completion.sh $(DESTDIR)/etc/bash_completion.d/git-extras

uninstall:
@$(foreach BIN, $(BINS), \
echo "... uninstalling $(DESTDIR)/$(BIN)"; \
rm -f $(DESTDIR)/$(BIN); \
)
@$(foreach MAN, $(MAN_HTML), \
echo "... uninstalling $(DESTDIR)$(MANPREFIX)/`basename $(MAN)`"; \
rm -f "$(DESTDIR)$(MANPREFIX)/`basename $(MAN)`"; \
)
rm -f $(DESTDIR)/etc/bash_completion.d/git-extras

.PHONY: install uninstall
2 changes: 1 addition & 1 deletion bin/git-alias
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env bash

case $# in
0) git config --get-regexp 'alias.*' | colrm 1 6 | sed 's/[ ]/ = /' | sort ;;
0) git config --get-regexp 'alias.*' | sed 's/^alias\.//' | sed 's/[ ]/ = /' | sort ;;
1) git alias | grep -e -- "$1" ;;
*) git config --global "alias.$1" "$2" ;;
esac
2 changes: 1 addition & 1 deletion bin/git-changelog
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,7 @@ main() {
cat "$tmpfile"
rm -f "$tmpfile"
else
mv -f "$tmpfile" "$changelog"
cp -f "$tmpfile" "$changelog"
[[ -n "$GIT_EDITOR" ]] && $GIT_EDITOR "$changelog"
if [[ $? -ne 0 ]]; then
_exit
Expand Down
2 changes: 1 addition & 1 deletion bin/git-extras
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ case "$1" in
update
;;
*)
man git-extras
git extras --help
;;
esac