Skip to content

Commit

Permalink
kconfig*.sh: fix shellcheck errors
Browse files Browse the repository at this point in the history
used double-quotes and export

tested with: "shellcheck kconfig-*.sh"

Signed-off-by: Pierre-Louis Bossart <[email protected]>
  • Loading branch information
plbossart committed Apr 24, 2024
1 parent 2821509 commit 1923c68
Show file tree
Hide file tree
Showing 9 changed files with 93 additions and 92 deletions.
24 changes: 12 additions & 12 deletions kconfig-distro-sof-dev-update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,22 @@

set -e

KCONFIG_DIR=$(dirname ${BASH_SOURCE[0]})
echo $KCONFIG_DIR
KCONFIG_DIR=$(dirname "${BASH_SOURCE[0]}")
echo "$KCONFIG_DIR"

. $KCONFIG_DIR/kconfig-lib.sh
. "$KCONFIG_DIR"/kconfig-lib.sh

echo "-sof" > localversion
make olddefconfig
make localmodconfig

$COMMAND .config \
$KCONFIG_DIR/sof-defconfig \
$KCONFIG_DIR/sof-dev-defconfig \
$KCONFIG_DIR/amd-defconfig \
$KCONFIG_DIR/mach-driver-defconfig \
$KCONFIG_DIR/hdaudio-codecs-defconfig \
$KCONFIG_DIR/lock-stall-defconfig \
$KCONFIG_DIR/soundwire-defconfig \
$KCONFIG_DIR/soundwire-codecs-defconfig \
$@
"$KCONFIG_DIR"/sof-defconfig \
"$KCONFIG_DIR"/sof-dev-defconfig \
"$KCONFIG_DIR"/amd-defconfig \
"$KCONFIG_DIR"/mach-driver-defconfig \
"$KCONFIG_DIR"/hdaudio-codecs-defconfig \
"$KCONFIG_DIR"/lock-stall-defconfig \
"$KCONFIG_DIR"/soundwire-defconfig \
"$KCONFIG_DIR"/soundwire-codecs-defconfig \
"$@"
20 changes: 10 additions & 10 deletions kconfig-distro-sof-update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,20 @@

set -e

KCONFIG_DIR=$(dirname ${BASH_SOURCE[0]})
echo $KCONFIG_DIR
KCONFIG_DIR=$(dirname "${BASH_SOURCE[0]}")
echo "$KCONFIG_DIR"

. $KCONFIG_DIR/kconfig-lib.sh
. "$KCONFIG_DIR"/kconfig-lib.sh

echo "-sof" > localversion
make olddefconfig
make localmodconfig

$COMMAND .config \
$KCONFIG_DIR/sof-defconfig \
$KCONFIG_DIR/amd-defconfig \
$KCONFIG_DIR/mach-driver-defconfig \
$KCONFIG_DIR/hdaudio-codecs-defconfig \
$KCONFIG_DIR/lock-stall-defconfig \
$KCONFIG_DIR/soundwire-defconfig \
$@
"$KCONFIG_DIR"/sof-defconfig \
"$KCONFIG_DIR"/amd-defconfig \
"$KCONFIG_DIR"/mach-driver-defconfig \
"$KCONFIG_DIR"/hdaudio-codecs-defconfig \
"$KCONFIG_DIR"/lock-stall-defconfig \
"$KCONFIG_DIR"/soundwire-defconfig \
"$@"
14 changes: 7 additions & 7 deletions kconfig-hda.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@

set -e

KCONFIG_DIR=$(dirname ${BASH_SOURCE[0]})
echo $KCONFIG_DIR
KCONFIG_DIR=$(dirname "${BASH_SOURCE[0]}")
echo "$KCONFIG_DIR"

. $KCONFIG_DIR/kconfig-lib.sh
. "$KCONFIG_DIR"/kconfig-lib.sh

make defconfig
$COMMAND .config \
$KCONFIG_DIR/base-defconfig \
$KCONFIG_DIR/devices-defconfig \
$KCONFIG_DIR/hdaudio-codecs-defconfig \
$@
"$KCONFIG_DIR"/base-defconfig \
"$KCONFIG_DIR"/devices-defconfig \
"$KCONFIG_DIR"/hdaudio-codecs-defconfig \
"$@"
7 changes: 4 additions & 3 deletions kconfig-lib.sh
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
#!/bin/bash

BUILD_DIR=$(pwd)

# find merge_config in code directory
FILE=scripts/kconfig/merge_config.sh
if test -f "$FILE"; then
COMMAND=$FILE;
export COMMAND=$FILE;
else
# try if the script in a work directory without the -build path
CODE_DIR=${BUILD_DIR%-build}
if test -f "$CODE_DIR/$FILE"; then
COMMAND=$CODE_DIR/$FILE;
export COMMAND=$CODE_DIR/$FILE;
else
# try if the script is accessible via the source symlink
SOURCE_DIR=$BUILD_DIR/source
if test -f "$SOURCE_DIR/$FILE"; then
COMMAND=$SOURCE_DIR/$FILE;
export COMMAND=$SOURCE_DIR/$FILE;
else
echo "error: could not find $FILE";
exit 1;
Expand Down
24 changes: 12 additions & 12 deletions kconfig-minimize-distro-add-sof-defaults.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@

set -e

KCONFIG_DIR=$(dirname ${BASH_SOURCE[0]})
echo $KCONFIG_DIR
KCONFIG_DIR=$(dirname "${BASH_SOURCE[0]}")
echo "$KCONFIG_DIR"

. $KCONFIG_DIR/kconfig-lib.sh
. "$KCONFIG_DIR"/kconfig-lib.sh

$COMMAND .config \
$KCONFIG_DIR/minimize-defconfig \
$KCONFIG_DIR/sof-defconfig \
$KCONFIG_DIR/sof-dev-defconfig \
$KCONFIG_DIR/mach-driver-defconfig \
$KCONFIG_DIR/hdaudio-codecs-defconfig \
$KCONFIG_DIR/telemetry-debugfs-defconfig \
$KCONFIG_DIR/lock-stall-defconfig \
$KCONFIG_DIR/soundwire-defconfig \
$@
"$KCONFIG_DIR"/minimize-defconfig \
"$KCONFIG_DIR"/sof-defconfig \
"$KCONFIG_DIR"/sof-dev-defconfig \
"$KCONFIG_DIR"/mach-driver-defconfig \
"$KCONFIG_DIR"/hdaudio-codecs-defconfig \
"$KCONFIG_DIR"/telemetry-debugfs-defconfig \
"$KCONFIG_DIR"/lock-stall-defconfig \
"$KCONFIG_DIR"/soundwire-defconfig \
"$@"
14 changes: 7 additions & 7 deletions kconfig-sof-arm64.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@

set -e

KCONFIG_DIR=$(dirname ${BASH_SOURCE[0]})
echo $KCONFIG_DIR
KCONFIG_DIR=$(dirname "${BASH_SOURCE[0]}")
echo "$KCONFIG_DIR"

. $KCONFIG_DIR/kconfig-lib.sh
. "$KCONFIG_DIR"/kconfig-lib.sh

make defconfig ARCH=arm64
$COMMAND -m .config \
$KCONFIG_DIR/arm64-nobloat-defconfig \
$KCONFIG_DIR/sof-defconfig \
$KCONFIG_DIR/sof-dev-defconfig \
$@
"$KCONFIG_DIR"/arm64-nobloat-defconfig \
"$KCONFIG_DIR"/sof-defconfig \
"$KCONFIG_DIR"/sof-dev-defconfig \
"$@"
make olddefconfig ARCH=arm64
22 changes: 11 additions & 11 deletions kconfig-sof-default-nodev.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@

set -e

KCONFIG_DIR=$(dirname ${BASH_SOURCE[0]})
echo $KCONFIG_DIR
KCONFIG_DIR=$(dirname "${BASH_SOURCE[0]}")
echo "$KCONFIG_DIR"

. $KCONFIG_DIR/kconfig-lib.sh
. "$KCONFIG_DIR"/kconfig-lib.sh

make defconfig
$COMMAND .config \
$KCONFIG_DIR/base-defconfig \
$KCONFIG_DIR/devices-defconfig \
$KCONFIG_DIR/sof-defconfig \
$KCONFIG_DIR/amd-defconfig \
$KCONFIG_DIR/mach-driver-defconfig \
$KCONFIG_DIR/hdaudio-codecs-defconfig \
$KCONFIG_DIR/soundwire-defconfig \
$@
"$KCONFIG_DIR"/base-defconfig \
"$KCONFIG_DIR"/devices-defconfig \
"$KCONFIG_DIR"/sof-defconfig \
"$KCONFIG_DIR"/amd-defconfig \
"$KCONFIG_DIR"/mach-driver-defconfig \
"$KCONFIG_DIR"/hdaudio-codecs-defconfig \
"$KCONFIG_DIR"/soundwire-defconfig \
"$@"
34 changes: 17 additions & 17 deletions kconfig-sof-default.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,24 @@

set -e

KCONFIG_DIR=$(dirname ${BASH_SOURCE[0]})
echo $KCONFIG_DIR
KCONFIG_DIR=$(dirname "${BASH_SOURCE[0]}")
echo "$KCONFIG_DIR"

. $KCONFIG_DIR/kconfig-lib.sh
. "$KCONFIG_DIR"/kconfig-lib.sh

make defconfig
$COMMAND .config \
$KCONFIG_DIR/base-defconfig \
$KCONFIG_DIR/devices-defconfig \
$KCONFIG_DIR/sof-defconfig \
$KCONFIG_DIR/sof-dev-defconfig \
$KCONFIG_DIR/amd-defconfig \
$KCONFIG_DIR/avs-defconfig \
$KCONFIG_DIR/mach-driver-defconfig \
$KCONFIG_DIR/hdaudio-codecs-defconfig \
$KCONFIG_DIR/telemetry-debugfs-defconfig \
$KCONFIG_DIR/lock-stall-defconfig \
$KCONFIG_DIR/soundwire-defconfig \
$KCONFIG_DIR/soundwire-codecs-defconfig \
$KCONFIG_DIR/bpf-defconfig \
$@
"$KCONFIG_DIR"/base-defconfig \
"$KCONFIG_DIR"/devices-defconfig \
"$KCONFIG_DIR"/sof-defconfig \
"$KCONFIG_DIR"/sof-dev-defconfig \
"$KCONFIG_DIR"/amd-defconfig \
"$KCONFIG_DIR"/avs-defconfig \
"$KCONFIG_DIR"/mach-driver-defconfig \
"$KCONFIG_DIR"/hdaudio-codecs-defconfig \
"$KCONFIG_DIR"/telemetry-debugfs-defconfig \
"$KCONFIG_DIR"/lock-stall-defconfig \
"$KCONFIG_DIR"/soundwire-defconfig \
"$KCONFIG_DIR"/soundwire-codecs-defconfig \
"$KCONFIG_DIR"/bpf-defconfig \
"$@"
26 changes: 13 additions & 13 deletions kconfig-sof-nocodec.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,20 @@

set -e

KCONFIG_DIR=$(dirname ${BASH_SOURCE[0]})
echo $KCONFIG_DIR
KCONFIG_DIR=$(dirname "${BASH_SOURCE[0]}")
echo "$KCONFIG_DIR"

. $KCONFIG_DIR/kconfig-lib.sh
. "$KCONFIG_DIR"/kconfig-lib.sh

make defconfig
$COMMAND .config \
$KCONFIG_DIR/base-defconfig \
$KCONFIG_DIR/devices-defconfig \
$KCONFIG_DIR/sof-defconfig \
$KCONFIG_DIR/sof-dev-defconfig \
$KCONFIG_DIR/amd-defconfig \
$KCONFIG_DIR/nocodec-defconfig \
$KCONFIG_DIR/telemetry-debugfs-defconfig \
$KCONFIG_DIR/lock-stall-defconfig \
$KCONFIG_DIR/bpf-defconfig \
$@
"$KCONFIG_DIR"/base-defconfig \
"$KCONFIG_DIR"/devices-defconfig \
"$KCONFIG_DIR"/sof-defconfig \
"$KCONFIG_DIR"/sof-dev-defconfig \
"$KCONFIG_DIR"/amd-defconfig \
"$KCONFIG_DIR"/nocodec-defconfig \
"$KCONFIG_DIR"/telemetry-debugfs-defconfig \
"$KCONFIG_DIR"/lock-stall-defconfig \
"$KCONFIG_DIR"/bpf-defconfig \
"$@"

0 comments on commit 1923c68

Please sign in to comment.