Apply shellcheck recommendations (#1389)

* compile.sh: Apply shellcheck recommendations

* lib/upgrade.sh: Apply shellcheck recommendations

* lib/main.sh: Apply shellcheck recommendations

* lib/desktop.sh: Apply shellcheck recommendations

* lib/makeboarddeb.sh: Apply shellcheck recommendations
This commit is contained in:
Manuel Rüger
2019-05-30 22:19:53 +02:00
committed by Igor Pečovnik
parent fb30186165
commit bffdfcd7f0
5 changed files with 170 additions and 148 deletions

View File

@@ -1,3 +1,5 @@
#!/bin/bash
# Copyright (c) 2015-2017 Igor Pecovnik, igor.pecovnik@gma**.com
# Copyright (c) 2015-2017 other Armbian contributors (https://github.com/armbian/build/graphs/contributors)
#
@@ -13,12 +15,12 @@
TTY_X=$(($(stty size | awk '{print $2}')-6)) # determine terminal width
TTY_Y=$(($(stty size | awk '{print $1}')-6)) # determine terminal height
if [[ $(basename $0) == main.sh ]]; then
if [[ $(basename "$0") == main.sh ]]; then
echo "Please use compile.sh to start the build process"
exit -1
exit 255
fi
if [[ $(basename $0) == compile.sh ]]; then
if [[ $(basename "$0") == compile.sh ]]; then
# assuming dialog was installed already since this is supposed to be shown only on upgrade from previous versions
dialog --title "Directory structure change notice" --colors --msgbox "Build script directory structure was changed to simplify the build environment setup, \
simplify upgrading in the future and improve compatibility with containers like Docker and Vagrant
@@ -28,5 +30,5 @@ if [[ $(basename $0) == compile.sh ]]; then
Default build configuration is defined in \Z1config-default.conf\Zn (created on first build script run)
Sorry for the inconvenience" $TTY_Y $TTY_X
exit -1
exit 255
fi