Use `file --dereference' instead of `readlink -f' + `file'.

`readlink -f' is not standard and may not be present on all systems (such as
some BSDs).

Instead of the readlink+file combo, just ask file(1) to dereference the file
it is given.

R=mark@chromium.org

Review URL: https://codereview.chromium.org/19221002

git-svn-id: http://src.chromium.org/svn/trunk/src/build@211783 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
This commit is contained in:
raphael.kubo.da.costa@intel.com 2013-07-16 11:49:19 +00:00
Родитель 1720d78b9d
Коммит b7ba0f1901
1 изменённых файлов: 1 добавлений и 6 удалений

Просмотреть файл

@ -10,12 +10,7 @@
# python_arch.sh /path/to/sysroot/usr/lib/libpython2.4.so.1.0
#
python=$(readlink -f "$1")
if [ ! -r "$python" ]; then
echo unknown
exit 0
fi
file_out=$(file "$python")
file_out=$(file --dereference "$1")
if [ $? -ne 0 ]; then
echo unknown
exit 0