Commit a5da9fe8 authored by Vitaly Lipatov's avatar Vitaly Lipatov

epm-sh-functions: improve realpath workaround to support -s

parent 380e2e42
......@@ -965,11 +965,16 @@ is_command()
# compatibility layer
# add realpath if missed
# add realpath if missed (with -s support)
if ! is_command realpath ; then
realpath()
{
[ -n "$*" ] || return
if [ "$1" = "-s" ] ; then
shift
echo "$(cd "$(dirname "$1")" && pwd -P)/$(basename "$1")" #"
return
fi
readlink -f "$@"
}
fi
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment