From 0a7b4360adb26b102d85f3191f1061ce7f8dceb6 Mon Sep 17 00:00:00 2001 From: mathieui Date: Sat, 24 Jan 2015 18:00:48 +0100 Subject: [PATCH] =?UTF-8?q?Add=20a=20check=20to=20abort=20early=20if=20the?= =?UTF-8?q?=20pyvenv=20command=20needed=20in=20update.sh=20doesn=E2=80=99t?= =?UTF-8?q?=20exist?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- update.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/update.sh b/update.sh index dfaadd00..bacd502d 100755 --- a/update.sh +++ b/update.sh @@ -16,6 +16,15 @@ if [ -z "$POEZIO_VENV_COMMAND" ] then POEZIO_VENV_COMMAND="pyvenv" fi +command -v $POEZIO_VENV_COMMAND > /dev/null 2>&1 || { + echo "'$POEZIO_VENV_COMMAND' executable not found. Check that you have python (>= 3.4) installed," + echo " and that \$POEZIO_VENV_COMMAND points to a valid virtualenv command." + if [ "$POEZIO_VENV_COMMAND" = 'pyvenv' ]; then + echo "If your distribution does not provide a 'pyvenv' command, maybe it has another name, like 'pyvenv-3.4'" + echo 'Set the $POEZIO_VENV_COMMAND env variable to the name of that executable and this script will use it.' + fi + exit 1 +} echo 'Updating poezio' git pull origin master || {