summaryrefslogtreecommitdiff
path: root/mcon/U
diff options
context:
space:
mode:
authorH.Merijn Brand <h.m.brand@xs4all.nl>2016-05-29 18:10:56 +0200
committerRaphael Manfredi <Raphael_Manfredi@pobox.com>2016-05-29 18:10:56 +0200
commit7b711f54a2b43efe5901e6ae497be335a121af4c (patch)
tree00dbbf0611724fefd612ae58abddeb1b9dc5f5dd /mcon/U
parentcfaabf4a42cf72bf61187950a8bc8f082a5f6a2f (diff)
Ask pwd the absolute path if $src is relative (#5)
Diffstat (limited to 'mcon/U')
-rw-r--r--mcon/U/src.U12
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