version.sh fix a few bashism...

script version.sh does not appear to be a /bin/sh script
possible bashism in version.sh line 7 (should be 'b = a'):
if [ "x${ARCH}" == "xx86_64" ] || [ "x${ARCH}" == "xi686" ] ; then
possible bashism in version.sh line 9 (let ...):
        let CORES=$CORES+1
possible bashism in version.sh line 14 (should be >word 2>&1):
LC_ALL=C git help pull | grep -m 1 -e "--no-edit" &>/dev/null && GIT_NOEDIT=1
possible bashism in version.sh line 17 (should be VAR="${VAR}foo"):
        GIT_OPTS+="--no-edit"

Signed-off-by: Robert Nelson <robertcnelson@gmail.com>
system.sh.sample: fix bashism

script system.sh.sample does not appear to be a /bin/sh script
possible bashism in system.sh line 7 (should be 'b = a'):
if [ "x${ARCH}" == "xarmv7l" ] ; then

Pointed out by: armde@elektromaniak.wz.cz

Signed-off-by: Robert Nelson <robertcnelson@gmail.com>
patch.sh: fix bashisms

voodoo@hestia:/opt/github/stable-kernel$ ./checkbashisms patch.sh
script patch.sh does not appear to be a /bin/sh script
possible bashism in patch.sh line 29 (should be '.', not 'source'):
        source ${DIR}/system.sh

Signed-off-by: Robert Nelson <robertcnelson@gmail.com>
scripts/gcc.sh: fix bashisms

voodoo@hestia:/opt/github/stable-kernel$ ./checkbashisms scripts/gcc.sh
script scripts/gcc.sh does not appear to be a /bin/sh script
possible bashism in scripts/gcc.sh line 26 (should be '.', not 'source'):
source ${DIR}/system.sh
possible bashism in scripts/gcc.sh line 33 (should be 'b = a'):
                if [ "x${distro}" == "xUbuntu" ] ; then
possible bashism in scripts/gcc.sh line 93 (should be 'b = a'):
        if [ "x${ARCH}" == "xarmv7l" ] ; then
possible bashism in scripts/gcc.sh line 133 (should be 'b = a'):
if [ "x${CC}" == "x" ] && [ "x${ARCH}" != "xarmv7l" ] ; then
possible bashism in scripts/gcc.sh line 135 (should be 'b = a'):
        if [ "x${CC}" == "x" ] ; then
possible bashism in scripts/gcc.sh line 142 (should be 'b = a'):
if [ "x${GCC_TEST}" == "x" ] ; then

Signed-off-by: Robert Nelson <robertcnelson@gmail.com>
gcc: missed one bashism

Signed-off-by: Robert Nelson <robertcnelson@gmail.com>
scripts/git.sh: fix bashisms

voodoo@hestia:/opt/github/stable-kernel$ ./checkbashisms scripts/git.sh
script scripts/git.sh does not appear to be a /bin/sh script
possible bashism in scripts/git.sh line 35 (should be >word 2>&1):
        git tag | grep v${KERNEL_TAG} &>/dev/null || git_kernel_stable
possible bashism in scripts/git.sh line 115 (should be >word 2>&1):
        git branch -D master &>/dev/null || true
possible bashism in scripts/git.sh line 118 (should be >word 2>&1):
        git branch -D tmp-master &>/dev/null || true
possible bashism in scripts/git.sh line 122 (should be >word 2>&1):
        git tag | grep v${KERNEL_TAG} | grep -v rc &>/dev/null || git_kernel_torvalds
possible bashism in scripts/git.sh line 128 (should be >word 2>&1):
        git branch -D v${KERNEL_TAG}-${BUILD} &>/dev/null || true
possible bashism in scripts/git.sh line 145 (should be '.', not 'source'):
source ${DIR}/version.sh
possible bashism in scripts/git.sh line 146 (should be '.', not 'source'):
source ${DIR}/system.sh
possible bashism in scripts/git.sh line 158 (should be >word 2>&1):
        git branch | grep "*" | grep master &>/dev/null && ON_MASTER=1

Signed-off-by: Robert Nelson <robertcnelson@gmail.com>
tools/host_det.sh: fix bashisms

voodoo@hestia:/opt/github/stable-kernel$ ./checkbashisms tools/host_det.sh
script tools/host_det.sh does not appear to be a /bin/sh script
possible bashism in tools/host_det.sh line 6 ('function' is useless):
function warning { echo "! $@" >&2; }
possible bashism in tools/host_det.sh line 7 ('function' is useless):
function error { echo "* $@" >&2; exit 1; }
possible bashism in tools/host_det.sh line 8 ('function' is useless):
function info { echo "+ $@" >&2; }
possible bashism in tools/host_det.sh line 9 ('function' is useless):
function ltrim { echo "$1" | awk '{ gsub(/^[ \t]+/,"", $0); print $0}'; }
possible bashism in tools/host_det.sh line 10 ('function' is useless):
function rtrim { echo "$1" | awk '{ gsub(/[ \t]+$/,"", $0); print $0}'; }
possible bashism in tools/host_det.sh line 11 ('function' is useless):
function trim { local x="$( ltrim "$1")"; x="$( rtrim "$x")"; echo "$x"; }
possible bashism in tools/host_det.sh line 15 ('function' is useless):
function detect_host {
possible bashism in tools/host_det.sh line 35 ('function' is useless):
function redhat_reqs
possible bashism in tools/host_det.sh line 40 ('function' is useless):
function suse_regs
possible bashism in tools/host_det.sh line 93 ('function' is useless):
function debian_regs
possible bashism in tools/host_det.sh line 96 (should be VAR="${VAR}foo"):
        dpkg -l | grep bc >/dev/null || deb_pkgs+="bc "
possible bashism in tools/host_det.sh line 97 (should be VAR="${VAR}foo"):
        dpkg -l | grep build-essential >/dev/null || deb_pkgs+="build-essential "
possible bashism in tools/host_det.sh line 98 (should be VAR="${VAR}foo"):
        dpkg -l | grep device-tree-compiler >/dev/null || deb_pkgs+="device-tree-compiler "
possible bashism in tools/host_det.sh line 99 (should be VAR="${VAR}foo"):
        dpkg -l | grep lsb-release >/dev/null || deb_pkgs+="lsb-release "
possible bashism in tools/host_det.sh line 100 (should be VAR="${VAR}foo"):
        dpkg -l | grep lzma >/dev/null || deb_pkgs+="lzma "
possible bashism in tools/host_det.sh line 101 (should be VAR="${VAR}foo"):
        dpkg -l | grep lzop >/dev/null || deb_pkgs+="lzop "
possible bashism in tools/host_det.sh line 102 (should be VAR="${VAR}foo"):
        dpkg -l | grep fakeroot >/dev/null || deb_pkgs+="fakeroot "
possible bashism in tools/host_det.sh line 108 (should be VAR="${VAR}foo"):
                        deb_pkgs+="libncurses5-dev "
possible bashism in tools/host_det.sh line 124 (should be VAR="${VAR}foo"):
                        dpkg -l | grep uboot-mkimage >/dev/null || deb_pkgs+="uboot-mkimage "
possible bashism in tools/host_det.sh line 127 (should be VAR="${VAR}foo"):
                        dpkg -l | grep u-boot-tools >/dev/null || deb_pkgs+="u-boot-tools "
possible bashism in tools/host_det.sh line 135 (should be 'b = a'):
                if [ "x${cpu_arch}" == "xx86_64" ] ; then
possible bashism in tools/host_det.sh line 139 (should be VAR="${VAR}foo"):
                                dpkg -l | grep ia32-libs >/dev/null || deb_pkgs+="ia32-libs "
possible bashism in tools/host_det.sh line 142 (should be VAR="${VAR}foo"):
                                dpkg -l | grep ia32-libs >/dev/null || deb_pkgs+="ia32-libs "
possible bashism in tools/host_det.sh line 150 (should be 'b = a'):
                                if [ "x" == "x${check_foreign}" ] ; then

Signed-off-by: Robert Nelson <robertcnelson@gmail.com>
tools/install_kernel.sh: fix bashisms

voodoo@hestia:/opt/github/stable-kernel$ ./checkbashisms tools/install_kernel.sh
script tools/install_kernel.sh does not appear to be a /bin/sh script
possible bashism in tools/install_kernel.sh line 31 (should be '.', not 'source'):
source ${DIR}/version.sh
possible bashism in tools/install_kernel.sh line 77 (should be '.', not 'source'):
                source "${location}/SOC.sh"
possible bashism in tools/install_kernel.sh line 148 ('((' should be '$(('):
        for (( c=1; c<=${num_partitions}; c++ ))
possible bashism in tools/install_kernel.sh line 188 ('((' should be '$(('):
        for (( c=1; c<=${NUM_MOUNTS}; c++ ))
possible bashism in tools/install_kernel.sh line 191 (should be >word 2>&1):
                sudo umount ${DRIVE} &> /dev/null || true
possible bashism in tools/install_kernel.sh line 215 (read with option other than -r):
                read -p "Are you 100% sure, on selecting [${MMC}] (y/n)? "
possible bashism in tools/install_kernel.sh line 215 (read without variable):
                read -p "Are you 100% sure, on selecting [${MMC}] (y/n)? "
possible bashism in tools/install_kernel.sh line 216 (should be 'b = a'):
                [ "${REPLY}" == "y" ] && unmount_partitions
possible bashism in tools/install_kernel.sh line 232 (should be '.', not 'source'):
        source ${DIR}/system.sh
possible bashism in tools/install_kernel.sh line 236 (should be 'b = a'):
                if [ "x${MMC}" == "x" ] ; then
possible bashism in tools/install_kernel.sh line 240 (alternative test command ([[ foo ]] should be [ foo ])):
                        if [[ "${MMC}" =~ "mmcblk" ]] ; then

Signed-off-by: Robert Nelson <robertcnelson@gmail.com>
tools/push-n-tag-release.sh: fix bashisms

voodoo@hestia:/opt/github/stable-kernel$ ./checkbashisms tools/push-n-tag-release.sh
script tools/push-n-tag-release.sh does not appear to be a /bin/sh script
possible bashism in tools/push-n-tag-release.sh line 29 (should be '.', not 'source'):
        source ${DIR}/version.sh

Signed-off-by: Robert Nelson <robertcnelson@gmail.com>
scripts: fix a lot of bashisms

Signed-off-by: Robert Nelson <robertcnelson@gmail.com>
bashism: missed

Signed-off-by: Robert Nelson <robertcnelson@gmail.com>
scripts/git.sh: as long as the directory is writable clone to that

Noticed by: armde@elektromaniak.wz.cz

Signed-off-by: Robert Nelson <robertcnelson@gmail.com>
Revert "scripts/git.sh: as long as the directory is writable clone to that"

It's safer for a users system to go back the way it was.

I'll leave it up to the user to actually 'git clone' a valid tree before running this script

This reverts commit e5ae0d0e7486d282d27719f7b851f65e7ecf9d54.

Signed-off-by: Robert Nelson <robertcnelson@gmail.com>
distro: just ignore dependices with eol distros

Signed-off-by: Robert Nelson <robertcnelson@gmail.com>
spelling

Signed-off-by: Robert Nelson <robertcnelson@gmail.com>
bash/dash safe PARTITION_PREFIX

Signed-off-by: Robert Nelson <robertcnelson@gmail.com>
drop time

Signed-off-by: Robert Nelson <robertcnelson@gmail.com>
cleanup

Signed-off-by: Robert Nelson <robertcnelson@gmail.com>
13.10 is saucy

Signed-off-by: Robert Nelson <robertcnelson@gmail.com>
just use the bash for loops

Signed-off-by: Robert Nelson <robertcnelson@gmail.com>