diff options
author | H.Merijn Brand <h.m.brand@xs4all.nl> | 2016-05-29 18:10:56 +0200 |
---|---|---|
committer | Raphael Manfredi <Raphael_Manfredi@pobox.com> | 2016-05-29 18:10:56 +0200 |
commit | 7b711f54a2b43efe5901e6ae497be335a121af4c (patch) | |
tree | 00dbbf0611724fefd612ae58abddeb1b9dc5f5dd /mcon/U | |
parent | cfaabf4a42cf72bf61187950a8bc8f082a5f6a2f (diff) |
Ask pwd the absolute path if $src is relative (#5)
Diffstat (limited to 'mcon/U')
-rw-r--r-- | mcon/U/src.U | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/mcon/U/src.U b/mcon/U/src.U index cba884f..87471e0 100644 --- a/mcon/U/src.U +++ b/mcon/U/src.U @@ -32,10 +32,14 @@ : Find the path to the source tree case "$src" in '') case "$0" in - */*) - src=`echo $0 | sed -e 's%/[^/][^/]*$%%'` - ;; - *) src='.';; + */*) src=`echo $0 | sed -e 's%/[^/][^/]*$%%'` + case "$src" in + /*) ;; + .) ;; + *) src=`cd ../$src && pwd` ;; + esac + ;; + *) src='.';; esac;; esac case "$src" in |