simplify absolute unix path detection

use the posix builtin that is used two lines down as well instead of sed
with platform-specific options.

Change-Id: I439f79554d883564150004c1f7b6d8655a0ef192
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
This commit is contained in:
Oswald Buddenhagen 2014-11-28 14:24:53 +01:00
parent a07fd165f3
commit f407607897

View File

@ -2,14 +2,7 @@
FILE="$1"
RES="$FILE"
CUT_ARG="-b1"
if [ `uname -s` = "QNX" ]; then
# QNX does not understand "-b1"
CUT_ARG="-c1"
fi
if [ `echo $FILE | cut $CUT_ARG` = "/" ]; then
if [ -z "${FILE##/*}" ]; then
true
elif [ "$OSTYPE" = "msys" -a -z "${FILE##[a-zA-Z]:[/\\]*}" ]; then
true