summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: a3b427b)
raw | patch | inline | side by side (parent: a3b427b)
author | Junio C Hamano <junkio@cox.net> | |
Thu, 8 Sep 2005 04:26:52 +0000 (21:26 -0700) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Thu, 8 Sep 2005 05:08:30 +0000 (22:08 -0700) |
Originally from Martin Atukunda <matlads@dsmagic.com> but adjusted for
post-rename code.
Signed-off-by: Junio C Hamano <junkio@cox.net>
post-rename code.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Makefile | patch | blob | history | |
git.sh | [deleted file] | patch | blob | history |
git.sh.in | [new file with mode: 0755] | patch | blob |
diff --git a/Makefile b/Makefile
index 4f55f631b9327ce4af5c54a8050244f0debfa4df..d3d0855e03227c3e7796f9ed0e4fa390ad0d0afa 100644 (file)
--- a/Makefile
+++ b/Makefile
### Build rules
-all: $(PROGRAMS)
+all: $(PROGRAMS) git.sh
all:
$(MAKE) -C templates
+git.sh: git.sh.in Makefile
+ rm -f $@+ $@
+ sed -e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g' <$@.in >$@+
+ chmod +x $@+
+ mv $@+ $@
+
%.o: %.c
$(CC) -o $*.o -c $(ALL_CFLAGS) $<
%.o: %.S
clean:
rm -f *.o mozilla-sha1/*.o ppc/*.o $(PROGRAMS) $(LIB_FILE)
- rm -f git-core.spec
+ rm -f git-core.spec git.sh
rm -rf $(GIT_TARNAME)
rm -f $(GIT_TARNAME).tar.gz git-core_$(GIT_VERSION)-*.tar.gz
rm -f git-core_$(GIT_VERSION)-*.deb git-core_$(GIT_VERSION)-*.dsc
diff --git a/git.sh b/git.sh
--- a/git.sh
+++ /dev/null
@@ -1,27 +0,0 @@
-#!/bin/sh
-
-cmd=
-path=$(dirname $0)
-case "$#" in
-0) ;;
-*) cmd="$1"
- shift
- test -x $path/git-$cmd && exec $path/git-$cmd "$@" ;;
-esac
-
-echo "Usage: git COMMAND [OPTIONS] [TARGET]"
-if [ -n "$cmd" ]; then
- echo " git command '$cmd' not found: commands are:"
-else
- echo " git commands are:"
-fi
-
-cat <<\EOF
- add apply archimport bisect branch checkout cherry clone
- commit count-objects cvsimport diff fetch format-patch
- fsck-cache get-tar-commit-id init-db log ls-remote octopus
- pack-objects parse-remote patch-id prune pull push rebase
- relink rename repack request-pull reset resolve revert
- send-email shortlog show-branch status tag verify-tag
- whatchanged
-EOF
diff --git a/git.sh.in b/git.sh.in
--- /dev/null
+++ b/git.sh.in
@@ -0,0 +1,32 @@
+#!/bin/sh
+
+cmd=
+path=$(dirname $0)
+case "$#" in
+0) ;;
+*) cmd="$1"
+ shift
+ case "$cmd" in
+ -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
+ echo "git version @@GIT_VERSION@@"
+ exit 0 ;;
+ esac
+ test -x $path/git-$cmd && exec $path/git-$cmd "$@" ;;
+esac
+
+echo "Usage: git COMMAND [OPTIONS] [TARGET]"
+if [ -n "$cmd" ]; then
+ echo " git command '$cmd' not found: commands are:"
+else
+ echo " git commands are:"
+fi
+
+cat <<\EOF
+ add apply archimport bisect branch checkout cherry clone
+ commit count-objects cvsimport diff fetch format-patch
+ fsck-cache get-tar-commit-id init-db log ls-remote octopus
+ pack-objects parse-remote patch-id prune pull push rebase
+ relink rename repack request-pull reset resolve revert
+ send-email shortlog show-branch status tag verify-tag
+ whatchanged
+EOF