summaryrefslogtreecommitdiffstats
path: root/git-ndim-sh
diff options
context:
space:
mode:
authorHans Ulrich Niedermann <hun@n-dimensional.de>2007-11-07 16:22:07 +0100
committerHans Ulrich Niedermann <hun@n-dimensional.de>2007-11-07 16:22:07 +0100
commita341a7fafd1d39f02be34430852d2c0736ca5447 (patch)
tree8b07ea318e33e55c88e5524ef5e2c1bdd6e4fc3c /git-ndim-sh
parent0cb782ade9552ed0e393e4baf7565661c3420edb (diff)
downloadndim-git-utils-a341a7fafd1d39f02be34430852d2c0736ca5447.tar.gz
ndim-git-utils-a341a7fafd1d39f02be34430852d2c0736ca5447.tar.xz
ndim-git-utils-a341a7fafd1d39f02be34430852d2c0736ca5447.zip
Add new utilities: git-follow, git-buildmsg
Diffstat (limited to 'git-ndim-sh')
-rw-r--r--git-ndim-sh/Makefile-files6
-rw-r--r--git-ndim-sh/git-ndim-sh.in50
2 files changed, 56 insertions, 0 deletions
diff --git a/git-ndim-sh/Makefile-files b/git-ndim-sh/Makefile-files
new file mode 100644
index 0000000..4b4c626
--- /dev/null
+++ b/git-ndim-sh/Makefile-files
@@ -0,0 +1,6 @@
+# -*- makefile -*-
+
+bin_SCRIPTS += git-ndim-sh/git-ndim-sh
+EXTRA_DIST += git-ndim-sh/git-ndim-sh.in
+UPLOAD_FILES += git-ndim-sh/git-ndim-sh
+AM_INSTALLCHECK_STD_OPTIONS_EXEMPT += git-ndim-sh/git-ndim-sh
diff --git a/git-ndim-sh/git-ndim-sh.in b/git-ndim-sh/git-ndim-sh.in
new file mode 100644
index 0000000..6856629
--- /dev/null
+++ b/git-ndim-sh/git-ndim-sh.in
@@ -0,0 +1,50 @@
+#!/bin/sh
+
+# Designed to be sourced.
+case "$(basename "$0")" in
+ git-ndim-sh|git-ndim-sh.in)
+ echo "This script is not supposed to be executed." >&2
+ echo "Source it instead." >&2
+ exit 1
+ ;;
+esac
+
+if test "x$(pwd)" = "x`pwd`" && test "y$(echo "foobar")" = "y`echo foobar`"
+then :;
+else
+ echo "$self: FATAL: This shell does not support POSIX sh \$() command substitution" >&2
+ exit 1
+fi
+
+if test "x$(moo() { echo "meh"; }; moo)" = "xmeh"; then :;
+else
+ echo "$self: FATAL: This shell does not support POSIX sh functions" >&2
+ exit 1
+fi
+
+bindir="$(cd "$(dirname "$0")" && pwd)"
+prefixdir="$(dirname "$bindir")"
+
+case "$1" in
+ -V|--version)
+ echo "$self (@PACKAGE_NAME@) @PACKAGE_VERSION@"
+ exit 0
+ ;;
+ -h|--help)
+ for manpage in \
+ "${prefixdir}/share/man/man1/${self}.1.gz" \
+ "${prefixdir}/share/man/man1/${self}.1" \
+ "${prefixdir}/man/man1/${self}.1.gz" \
+ "${prefixdir}/man/man1/${self}.1" \
+ ;
+ do
+ if test -s "$manpage"
+ then
+ if man "$manpage" 2> /dev/null
+ then
+ exit 0
+ fi
+ fi
+ done
+ ;;
+esac