1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
#!/bin/sh -e # Originally found at: # https://trac.torproject.org/projects/tor/attachment/ticket/21227/git-remote-tor # Author: nicoo die() { echo "$0: fatal: " "$@" >&2 exit 1 } [ -n "$GIT_DIR" ] || die 'GIT_DIR not set' TRANSPORT="$(echo "$2" | cut -d: -f1)" exec torsocks git-remote-"${TRANSPORT}" "$@"