init
This commit is contained in:
commit
38355d2442
9083 changed files with 1225834 additions and 0 deletions
32
.venv/libexec/pyflyby/colordiff
Executable file
32
.venv/libexec/pyflyby/colordiff
Executable file
|
|
@ -0,0 +1,32 @@
|
|||
#!/bin/bash -e
|
||||
|
||||
# License for THIS FILE ONLY: CC0 Public Domain Dedication
|
||||
# http://creativecommons.org/publicdomain/zero/1.0/
|
||||
|
||||
# Get the directory containing to the symlink target of the script.
|
||||
if script=$(readlink -e "$0" 2>/dev/null) && [[ "$script" -ef "$0" ]]; then
|
||||
scriptdir=$(dirname "$script")
|
||||
elif script=$(realpath "$0" 2>/dev/null) && [[ "$script" -ef "$0" ]]; then
|
||||
scriptdir=$(dirname "$script")
|
||||
elif script=$(greadlink -e "$0" 2>/dev/null) && [[ "$script" -ef "$0" ]]; then
|
||||
scriptdir=$(dirname "$script")
|
||||
else
|
||||
scriptdir=$(
|
||||
d=$(dirname "$0")
|
||||
b=$(basename "$0")
|
||||
cd "$d"
|
||||
if l=$(readlink "$b"); then
|
||||
ld=$(dirname "$l")
|
||||
cd "$ld"
|
||||
fi
|
||||
pwd
|
||||
)
|
||||
fi
|
||||
|
||||
PATH="$scriptdir:$PATH"
|
||||
|
||||
if [[ -t 1 ]] && type -p diff-colorize >/dev/null; then
|
||||
diff -u "$@" | diff-colorize
|
||||
else
|
||||
diff -u "$@"
|
||||
fi
|
||||
Loading…
Add table
Add a link
Reference in a new issue