-#!/bin/sh
+#!/bin/bash
set -e
USAGE=$(cat <<"EOF"
COMMANDS
SYSROOT=$(rustc --print sysroot)
LIBDIR=$SYSROOT/lib/rustlib/$TARGET/lib
MIRIDIR=$(dirname "$0")
-if readlink -e . >/dev/null; then
+if readlink -e . &>/dev/null; then
# This platform supports `readlink -e`.
MIRIDIR=$(readlink -e "$MIRIDIR")
fi