Fix several bashate issues

* E001: Trailing Whitespace
* E003: Indent not multiple of 4
* E010: Do not on same line as for
* E011: Then keyword is not on same line as if keyword
* E020: Function declaration not in format
        "^function name {$": 'function check_file() {'

Change-Id: I73724bd2dfb9c908900919ce7b769c410a06eb1d
This commit is contained in:
Christian Berendt 2014-07-30 13:25:54 +02:00
parent 9048486908
commit 0c736d8069
3 changed files with 18 additions and 21 deletions

View File

@ -82,8 +82,7 @@ else
done
fi
if [ "$no_venv" == 0 ]
then
if [ "$no_venv" == 0 ]; then
# Remove the virtual environment if --force used
if [ "$force" == 1 ]; then
echo "Cleaning virtualenv..."

View File

@ -7,7 +7,7 @@
# well. We should probably sort those on the egg-name, rather than the
# full line.
function check_file() {
function check_file {
typeset f=$1
# We don't care about comment lines.
@ -20,11 +20,9 @@ function check_file() {
}
exit_code=0
for filename in $@
do
for filename in $@; do
check_file $filename
if [ $? -ne 0 ]
then
if [ $? -ne 0 ]; then
echo "Please list requirements in $filename in alphabetical order" 1>&2
exit_code=1
fi