Commits

Stefan Saasen  committed 326bc1c

Add basic Makefile and man pages

  • Participants
  • Parent commits 38949c0

Comments (0)

Files changed (4)

+PREFIX ?= /usr/local
+MANPREFIX ?= "$(PREFIX)/share/man/man1"
+SCRIPTS = $(wildcard bin/git-*)
+MAN_PAGES = $(wildcard man/git-*.1)
+
+.PHONY: install uninstall
+
+install:
+	@mkdir -p $(DESTDIR)$(MANPREFIX)
+	@mkdir -p $(DESTDIR)$(PREFIX)/bin
+	@$(foreach BIN, $(SCRIPTS), \
+		echo "Installing `basename $(BIN)` -> $(DESTDIR)$(PREFIX)/bin"; \
+		cp -f $(BIN) $(DESTDIR)$(PREFIX)/$(BIN); \
+	)
+	@$(foreach MAN, $(MAN_PAGES), \
+		echo "Installing `basename $(MAN)` -> $(DESTDIR)$(MANPREFIX)"; \
+		cp -f $(MAN) $(DESTDIR)$(MANPREFIX)/`basename $(MAN)`; \
+	)
+
+uninstall:
+	@$(foreach BIN, $(SCRIPTS), \
+		echo "Removing $(DESTDIR)$(PREFIX)/$(BIN)"; \
+		rm -f $(DESTDIR)$(PREFIX)/$(BIN); \
+	)
+	@$(foreach MAN, $(MAN_PAGES), \
+		echo "Removing $(DESTDIR)$(MANPREFIX)/$(MAN)"; \
+		rm -f $(DESTDIR)$(MANPREFIX)/`basename $(MAN)`; \
+	)
 
 A few git things.
 
+Installation
+============
+
+In order to use the git-pastiche scripts as new subcommands with git, 
+they need to be available in your PATH.
+
+Option 1
+--------
+
 Add the `git-pastiche` directory to your `PATH`:
 
     export PATH=$PATH:~/git-pastiche/bin
 > git outgoing
 
 
-List of commands:
+
+Option 2
+--------
+
+Use the Makefile to copy the scripts to your `/usr/local/bin` directory.
+This will also copy the man pages to the appropriate directories on your
+system.
+
+  make install
+
+To remove the scripts and man pages run `uninstall`:
+
+  make uninstall
+
+Commands
+========
 
 * `git incoming` -> Show incoming changes (will fetch changes from the remote)
 * `git outgoing` -> Show the changes about to be pushed to the remote

File man/git-incoming.1

+.\" Manpage for git-incoming
+.TH man 1 "May 2012" "1.0" "git incoming man page"
+.SH NAME
+git incoming \- Show new changesets in the remote
+.SH SYNOPSIS
+git incoming
+.SH DESCRIPTION
+git incoming fetches the changes from the default remote and shows the
+changesets that would be merged into the current branch if "git pull" would be executed.
+.SH OPTIONS
+The incoming command does not take any options.
+.SH SEE ALSO
+git(1)
+.SH BUGS
+No known bugs.
+.SH AUTHOR
+Stefan Saasen <stefan@saasen.me>

File man/git-outgoing.1

+.\" Manpage for git-outgoing
+.TH man 1 "May 2012" "1.0" "git outgoing man page"
+.SH NAME
+git outgoing \- Show local changesets not on the remote
+.SH SYNOPSIS
+git outgoing
+.SH DESCRIPTION
+git outgoing shows all the changes that would be pushed to the remote.
+.SH OPTIONS
+The outgoing command does not take any options.
+.SH SEE ALSO
+git(1)
+.SH BUGS
+No known bugs.
+.SH AUTHOR
+Stefan Saasen <stefan@saasen.me>