install: Use readlink -f rather than realpath.

It does exactly the same thing, though the name is less transparent; and
it simplifies the script by avoiding an extra, early `apt-get install`.
This commit is contained in:
Greg Price 2018-02-08 17:19:40 -08:00
parent 8d86a6e331
commit 6e633f8e2f
2 changed files with 3 additions and 8 deletions

View File

@ -68,6 +68,8 @@ fi
# Do set -x after option parsing is complete
set -x
ZULIP_PATH="$(readlink -f $(dirname $0)/../..)"
# Force a known locale. Some packages on PyPI fail to install in some locales.
export LC_ALL="en_US.UTF-8"
@ -80,13 +82,6 @@ if [ "$mem_kb" -lt 1900000 ]; then
exit 1
fi
if ! [ -e /usr/bin/realpath ]; then
# realpath is in coreutils on Xenial, but not in Trusty
apt-get install -y realpath
fi
ZULIP_PATH="$(realpath $(dirname $0)/../..)"
# setup-apt-repo does an `apt-get update`
"$ZULIP_PATH"/scripts/lib/setup-apt-repo

View File

@ -44,7 +44,7 @@ run apt-get update
# As an optimization, we install a bunch of packages the installer
# would install for itself.
run apt-get install -y --no-install-recommends \
xvfb parallel netcat unzip zip jq python3-pip wget curl realpath eatmydata \
xvfb parallel netcat unzip zip jq python3-pip wget curl eatmydata \
git crudini openssl ssl-cert \
build-essential python3-dev \
closure-compiler memcached rabbitmq-server redis-server \