Enforce function declaration format in bash8
Check that function calls look like ^function foo {$ in bash8, and fix
all existing failures of that check. Add a note to HACKING.rst
Change-Id: Ic19eecb39e0b20273d1bcd551a42fe400d54e938
diff --git a/tools/install_pip.sh b/tools/install_pip.sh
index d714d33..9fa161e 100755
--- a/tools/install_pip.sh
+++ b/tools/install_pip.sh
@@ -50,7 +50,7 @@
GetDistro
echo "Distro: $DISTRO"
-function get_versions() {
+function get_versions {
PIP=$(which pip 2>/dev/null || which pip-python 2>/dev/null || true)
if [[ -n $PIP ]]; then
PIP_VERSION=$($PIP --version | awk '{ print $2}')
@@ -61,7 +61,7 @@
}
-function install_get_pip() {
+function install_get_pip {
if [[ ! -r $FILES/get-pip.py ]]; then
(cd $FILES; \
curl -O $PIP_GET_PIP_URL; \
@@ -70,7 +70,7 @@
sudo -E python $FILES/get-pip.py
}
-function install_pip_tarball() {
+function install_pip_tarball {
(cd $FILES; \
curl -O $PIP_TAR_URL; \
tar xvfz pip-$INSTALL_PIP_VERSION.tar.gz 1>/dev/null; \