]> git.ozlabs.org Git - next-scripts/blobdiff - do_build
start of shellcheck fixes
[next-scripts] / do_build
index 4a5e2c385786b822bf7ced398b3787d2e75a22a6..a49f1b4cb89afc7380499b8f6ea8c12f842aa66d 100755 (executable)
--- a/do_build
+++ b/do_build
@@ -1,6 +1,7 @@
 #!/bin/sh
 
-. "$(dirname $0)/common.sh"
+tools_dir=$(dirname "$0")
+. "$tools_dir/common.sh"
 
 set -e
 
@@ -32,27 +33,27 @@ $cmd <<-EOF
        e=\$d.except
        echo CONFIG_BUILD_DOCSRC=n >\$e || exit 1
        echo CONFIG_MODULES=y >>\$e || exit 1
-       KCONFIG_ALLCONFIG=\$e cross -n -N -a x86_64 -c $gcc_version O=\$d allmodconfig || exit 1
+       KCONFIG_ALLCONFIG=\$e cross -n -N -a x86_64 -c "$gcc_version" O=\$d allmodconfig || exit 1
        echo "Forking x86 build ..."
-       /usr/bin/time cross -n -N -a x86_64 -c $gcc_version O=\$d -j$j_factor -s > \$log_x86 2>&1 &
+       /usr/bin/time cross -n -N -a x86_64 -c "$gcc_version" O=\$d -j"$j_factor" -s > \$log_x86 2>&1 &
        x86_64_pid=\$!
 
        echo Building: powerpc ppc64_defconfig
        d="$bparent/powerpc_ppc64_defconfig"
        [ -d \$d ] || mkdir \$d || exit 1
        log_ppc=\$d.log
-       cross -n -N -a powerpc64 -k powerpc -c $gcc_ppc_version O=\$d ppc64_defconfig || exit 1
+       cross -n -N -a powerpc64 -k powerpc -c "$gcc_ppc_version" O=\$d ppc64_defconfig || exit 1
        echo "Forking powerpc build ..."
-       /usr/bin/time cross -n -N -a powerpc64 -k powerpc -c $gcc_ppc_version O=\$d -j$j_factor -s > \$log_ppc 2>&1 &
+       /usr/bin/time cross -n -N -a powerpc64 -k powerpc -c "$gcc_ppc_version" O=\$d -j"$j_factor" -s > \$log_ppc 2>&1 &
        ppc64_pid=\$!
 
        echo Building: arm multi_v7_defconfig
        d="$bparent/arm_multi_v7_defconfig"
        [ -d \$d ] || mkdir \$d || exit 1
        log_arm=\$d.log
-       cross -n -N -a arm -c $gcc_version O=\$d multi_v7_defconfig || exit 1
+       cross -n -N -a arm -c "$gcc_version" O=\$d multi_v7_defconfig || exit 1
        echo "Forking arm build ..."
-       /usr/bin/time cross -n -N -a arm -c $gcc_version O=\$d -j$j_factor -s > \$log_arm 2>&1 &
+       /usr/bin/time cross -n -N -a arm -c "$gcc_version" O=\$d -j"$j_factor" -s > \$log_arm 2>&1 &
        arm_pid=\$!
 
        echo Building: perf
@@ -60,7 +61,7 @@ $cmd <<-EOF
        [ -d \$d ] || mkdir \$d || exit 1
        log_perf=\$d.log
        echo "Forking perf build ..."
-       /usr/bin/time make -s -C tools/perf JOBS=$j_factor O=\$d > \$log_perf 2>&1 &
+       /usr/bin/time make -s -C tools/perf JOBS="$j_factor" O=\$d > \$log_perf 2>&1 &
        perf_pid=\$!
 
        wait \$perf_pid