Shellcheck fixes for configure.sh and steamrt-bootstrap.sh

In steamrt-bootstrap,sh
  + Used quotes to prevent word splitting SC2046
  + Used $() notation rather than legacy backtick SC2006
  + which is non-standard. 'command -v' is builtin SC2230

In configure.sh
  + Assigned to local variable separately to avoid masking return values SC2155
  + Used to quote to prevent glob matching SC2053
  + Used -z command rather than ! -n SC2236
  + Fixed SC2129 which would have a minor performance gain of avoiding constantly opening and closing the makefile.
This commit is contained in:
Krish De Souza
2018-11-06 23:32:57 +00:00
committed by Andrew Eikum
parent e47e856563
commit 416bea727e
2 changed files with 34 additions and 28 deletions

View File

@ -15,9 +15,9 @@ set -xe
apt-get install -y gcc-5 g++-5 g++-5-multilib flex bison libosmesa6-dev libpcap-dev \
libhal-dev libsane-dev libv4l-dev libgphoto2-2-dev libcapi20-dev \
libgsm1-dev libmpg123-dev libvulkan-dev libxslt1-dev nasm yasm ccache
update-alternatives --install `which gcc` gcc `which gcc-5` 50
update-alternatives --set gcc `which gcc-5`
update-alternatives --install `which g++` g++ `which g++-5` 50
update-alternatives --set g++ `which g++-5`
update-alternatives --install `which cpp` cpp-bin `which cpp-5` 50
update-alternatives --set cpp-bin `which cpp-5`
update-alternatives --install "$(command -v gcc)" gcc "$(command -v gcc-5)" 50
update-alternatives --set gcc "$(command -v gcc-5)"
update-alternatives --install "$(command -v g++)" g++ "$(command -v g++-5)" 50
update-alternatives --set g++ "$(command -v g++-5)"
update-alternatives --install "$(command -v cpp)" cpp-bin "$(command -v cpp-5)" 50
update-alternatives --set cpp-bin "$(command -v cpp-5)"