浏览代码

Canonicalize correctly even if PREFIX does not exist

The existence test is done on next line, and with -f in place,
canonicalization or non-existent PREFIX leads to empty PREFIX which
makes the next message confusing
Alois Mahdal 10 年前
父节点
当前提交
865d6f5b8a
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1
    1
      utils/mkit/include/mkit.sh

+ 1
- 1
utils/mkit/include/mkit.sh 查看文件

23
     sed -e 's/ = /=/' < config.mk > $tmp
23
     sed -e 's/ = /=/' < config.mk > $tmp
24
     . $tmp
24
     . $tmp
25
     rm -f $tmp
25
     rm -f $tmp
26
-    PREFIX="$(readlink -f "$PREFIX")"
26
+    PREFIX="$(readlink -m "$PREFIX")"
27
     test -d "$PREFIX" || die "PREFIX points to bad directory: $PREFIX"
27
     test -d "$PREFIX" || die "PREFIX points to bad directory: $PREFIX"
28
 }
28
 }
29
 
29