diff --git a/kconfig-distro-sof-dev-update.sh b/kconfig-distro-sof-dev-update.sh index 1f8edfd..da371a8 100755 --- a/kconfig-distro-sof-dev-update.sh +++ b/kconfig-distro-sof-dev-update.sh @@ -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 \ + "$@" diff --git a/kconfig-distro-sof-update.sh b/kconfig-distro-sof-update.sh index e599106..d7cd67e 100755 --- a/kconfig-distro-sof-update.sh +++ b/kconfig-distro-sof-update.sh @@ -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 \ + "$@" diff --git a/kconfig-hda.sh b/kconfig-hda.sh index 93171fe..733c130 100755 --- a/kconfig-hda.sh +++ b/kconfig-hda.sh @@ -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 \ + "$@" diff --git a/kconfig-lib.sh b/kconfig-lib.sh index ff5c87b..fe6ae04 100755 --- a/kconfig-lib.sh +++ b/kconfig-lib.sh @@ -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; diff --git a/kconfig-minimize-distro-add-sof-defaults.sh b/kconfig-minimize-distro-add-sof-defaults.sh index a995a57..168167f 100755 --- a/kconfig-minimize-distro-add-sof-defaults.sh +++ b/kconfig-minimize-distro-add-sof-defaults.sh @@ -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 \ + "$@" diff --git a/kconfig-sof-arm64.sh b/kconfig-sof-arm64.sh index af494a5..540bf8c 100755 --- a/kconfig-sof-arm64.sh +++ b/kconfig-sof-arm64.sh @@ -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 diff --git a/kconfig-sof-default-nodev.sh b/kconfig-sof-default-nodev.sh index 6f43abe..8169ddd 100755 --- a/kconfig-sof-default-nodev.sh +++ b/kconfig-sof-default-nodev.sh @@ -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 \ + "$@" diff --git a/kconfig-sof-default.sh b/kconfig-sof-default.sh index 929b83f..f0fff2e 100755 --- a/kconfig-sof-default.sh +++ b/kconfig-sof-default.sh @@ -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 \ + "$@" diff --git a/kconfig-sof-nocodec.sh b/kconfig-sof-nocodec.sh index 2736308..aee8bb6 100755 --- a/kconfig-sof-nocodec.sh +++ b/kconfig-sof-nocodec.sh @@ -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 \ + "$@"