summaryrefslogtreecommitdiff
path: root/bin/lt
diff options
context:
space:
mode:
Diffstat (limited to 'bin/lt')
-rwxr-xr-xbin/lt2
1 files changed, 2 insertions, 0 deletions
diff --git a/bin/lt b/bin/lt
index 48424ef..741c42d 100755
--- a/bin/lt
+++ b/bin/lt
@@ -37,6 +37,7 @@ ca() {
pp() {
pp_s=$1 pp_b=$2 R1=''
while true; do
+ ! [ "$pp_s" ] && R1='' && break
[ "$pp_b" = "$pp_s" ] && break
pp_s=${pp_s%/*}
[ "$R1" ] && R1=$R1/.. || R1=..
@@ -50,6 +51,7 @@ rp() {
! [ "$rp_c" ] && ca "$1" "$2" && rp_c=$R1
rp_bs=${rp_s#$rp_c/}
pp "$rp_d" "$rp_c" && R1=$R1/$rp_bs && R1=${R1#../}
+ case $R1 in //*) R1=${R1#/};; esac
}
skip=".git .gitignore .*.swp Makefile README.md"