summaryrefslogtreecommitdiff
path: root/git-sh-setup.sh
diff options
context:
space:
mode:
Diffstat (limited to 'git-sh-setup.sh')
-rwxr-xr-xgit-sh-setup.sh28
1 files changed, 28 insertions, 0 deletions
diff --git a/git-sh-setup.sh b/git-sh-setup.sh
index 8382339..80acb7d 100755
--- a/git-sh-setup.sh
+++ b/git-sh-setup.sh
@@ -11,6 +11,34 @@
# exporting it.
unset CDPATH
+git_broken_path_fix () {
+ case ":$PATH:" in
+ *:$1:*) : ok ;;
+ *)
+ PATH=$(
+ SANE_TOOL_PATH="$1"
+ IFS=: path= sep=
+ set x $PATH
+ shift
+ for elem
+ do
+ case "$SANE_TOOL_PATH:$elem" in
+ (?*:/bin | ?*:/usr/bin)
+ path="$path$sep$SANE_TOOL_PATH"
+ sep=:
+ SANE_TOOL_PATH=
+ esac
+ path="$path$sep$elem"
+ sep=:
+ done
+ echo "$path"
+ )
+ ;;
+ esac
+}
+
+# @@BROKEN_PATH_FIX@@
+
die() {
echo >&2 "$@"
exit 1