summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxime “pep” Buquet <pep@bouah.net>2020-09-08 10:31:08 +0200
committerMaxime “pep” Buquet <pep@bouah.net>2020-09-10 10:11:12 +0200
commit235b7a52a492c325371904af68a709ffb53fb9b0 (patch)
tree4861f5ab01aa19ada830486829e2f7a26d616a66
parent4b01469a62bc753af9d256d63e81244d424af003 (diff)
downloadpoezio-235b7a52a492c325371904af68a709ffb53fb9b0.tar.gz
poezio-235b7a52a492c325371904af68a709ffb53fb9b0.tar.bz2
poezio-235b7a52a492c325371904af68a709ffb53fb9b0.tar.xz
poezio-235b7a52a492c325371904af68a709ffb53fb9b0.zip
update.sh: bash 'strict mode'
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
-rwxr-xr-xupdate.sh14
1 files changed, 5 insertions, 9 deletions
diff --git a/update.sh b/update.sh
index 677aa03e..bbbaec5b 100755
--- a/update.sh
+++ b/update.sh
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
# Use this script to download or update all dependencies to their last
# developpement version.
# The dependencies will be located in a virtualenv, so you do not
@@ -6,16 +6,12 @@
# Use launch.sh to start poezio directly from here
+set -euo pipefail
+
cd "$(dirname "$0")"
-if [ -z "$POEZIO_VENV" ]
-then
- POEZIO_VENV="poezio-venv"
-fi
-if [ -z "$POEZIO_PYTHON" ]
-then
- POEZIO_PYTHON=python3
-fi
+POEZIO_VENV=${POEZIO_VENV:-poezio-venv}
+POEZIO_PYTHON=${POEZIO_PYTHON:-python3}
command -v "$POEZIO_PYTHON" > /dev/null 2>&1 || {
echo "Python executable '$POEZIO_PYTHON' not found."