Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: ryuslash/gitto
base: 5e17738e22
...
head fork: ryuslash/gitto
compare: ac87cfb21c
Checking mergeability… Don't worry, you can still create the pull request.
  • 2 commits
  • 7 files changed
  • 0 commit comments
  • 1 contributor
Commits on Jun 30, 2012
@ryuslash Add Makefiles, utility
Change the directory structure and add a bunch of Makefiles to make it
easy to install gitto. Also add a utility to run gitto in its current
state.
d7a622d
@ryuslash Reserve 15 columns for names
Align data about a repository at 15 characters, for now. Looks a
little bit cleaner.
ac87cfb
View
20 Makefile
@@ -0,0 +1,20 @@
+export DESTDIR ?= /usr
+
+dirs = src gitto
+install-dirs = $(addprefix install-,$(dirs))
+uninstall-dirs = $(addprefix uninstall-,$(dirs))
+
+.PHONY: all $(dirs) install $(install-dirs) uninstall $(uninstall-dirs)
+
+all: $(dirs)
+install: $(install-dirs)
+uninstall: $(uninstall-dirs)
+
+$(dirs):
+ $(MAKE) -C $@/
+
+$(install-dirs): install-%:
+ $(MAKE) -C $*/ install
+
+$(uninstall-dirs): uninstall-%:
+ $(MAKE) -C $*/ uninstall
View
1  gitto/.gitignore
@@ -0,0 +1 @@
+*.go
View
25 gitto/Makefile
@@ -0,0 +1,25 @@
+DESTDIR ?= /usr/local
+
+objects = main.go main.scm
+install-objects = $(addprefix install-,$(objects))
+uninstall-objects = $(addprefix uninstall-,$(objects))
+
+$(filter %.go,$(objects)): %.go: %.scm
+ guile-tools compile -o $@ $^
+
+.PHONY: install $(install-objects) uninstall $(uninstall-objects)
+
+install: $(install-objects)
+uninstall: $(uninstall-objects)
+
+$(filter %.go,$(install-objects)): install-%:
+ install -Dm 644 $* $(DESTDIR)/lib/guile/2.0/ccache/gitto/$*
+
+$(filter %.scm,$(install-objects)): install-%:
+ install -Dm 644 $* $(DESTDIR)/share/guile/2.0/gitto/$*
+
+$(filter %.go,$(uninstall-objects)): uninstall-%:
+ rm -f $(DESTDIR)/lib/guile/2.0/ccache/gitto/$*
+
+$(filter %.scm,$(uninstall-objects)): uninstall-%:
+ rm -f $(DESTDIR)/share/guile/2.0/gitto/$*
View
15 gitto.scm → gitto/main.scm 100755 → 100644
@@ -1,10 +1,9 @@
-#! /usr/bin/guile \
--e main -s
-!#
-(use-modules (ice-9 format)
- (ice-9 getopt-long)
- (ice-9 popen)
- (ice-9 rdelim))
+(define-module (gitto main)
+ #:use-module (ice-9 format)
+ #:use-module (ice-9 getopt-long)
+ #:use-module (ice-9 popen)
+ #:use-module (ice-9 rdelim)
+ #:export (main))
(define data-dir
(let ((xdg (getenv "XGD_DATA_HOME"))
@@ -97,7 +96,7 @@ gitto [options]
(let ((numup (git-revs-to-push))
(numdown (git-revs-to-pull))
(clean? (git-clean?)))
- (format #t "~a: ~d to push, ~d to pull and is ~adirty.\n"
+ (format #t "~a:~15t~d to push, ~d to pull and is ~adirty.\n"
(basename repo) numup numdown
(if clean? "not " ""))))
repositories))
View
5 run-gitto
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+export GUILE_LOAD_PATH="$(dirname $(realpath $0)):$GUILE_LOAD_PATH"
+export GUILE_LOAD_COMPILED_PATH="$(dirname $(realpath $0)):$GUILE_LOAD_PATH"
+exec src/gitto "$@"
View
11 src/Makefile
@@ -0,0 +1,11 @@
+DESTDIR ?= /usr/local
+
+all:
+
+.PHONY: install uninstall
+
+install: gitto
+ install -Dm 755 $^ ${DESTDIR}/bin/$^
+
+uninstall: gitto
+ rm -f ${DESTDIR}/bin/$^
View
4 src/gitto
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+BOOT="((@ (gitto main) main) (program-arguments))"
+exec guile $GUILE_FLAGS -c "$BOOT" "$0" "$@"

No commit comments for this range

Something went wrong with that request. Please try again.