2020-02-04 14:48:13 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
top=$(git rev-parse --show-toplevel 2>/dev/null | sed -e 's/\//\\\//g')
|
|
|
|
if [ -n "$top" ]
|
|
|
|
then
|
2020-02-07 12:15:51 +00:00
|
|
|
path=$(pwd -P | sed -e "s/^$top//")
|
2020-02-04 20:51:08 +00:00
|
|
|
if [ ! -z "$path" ]
|
|
|
|
then echo -n "$path "
|
|
|
|
fi
|
2020-02-04 14:48:13 +00:00
|
|
|
else
|
2020-02-04 20:51:08 +00:00
|
|
|
exit 1
|
2020-02-04 14:48:13 +00:00
|
|
|
fi
|