ath25: disable devices with 4M flash
[openwrt/openwrt.git] / scripts / mkits.sh
index def3d3c7c23c0f4e5ae7dee6b8bb72788f0637d3..468ef670e620dbf825fee55c578af1aa430c71d4 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/env bash
+#!/bin/sh
 #
 # Licensed under the terms of the GNU GPL License version 2 or later.
 #
@@ -15,8 +15,9 @@
 #
 
 usage() {
-       printf "Usage: %s -A arch -C comp -a addr -e entry -v version"\
-                "-k kernel [-D name -d dtb] -o its_file" "$(basename $0)"
+       printf "Usage: %s -A arch -C comp -a addr -e entry" "$(basename "$0")"
+       printf " -v version -k kernel [-D name -d dtb] -o its_file"
+
        printf "\n\t-A ==> set architecture to 'arch'"
        printf "\n\t-C ==> set compression type 'comp'"
        printf "\n\t-c ==> set config name 'config'"
@@ -43,7 +44,7 @@ do
                k ) KERNEL=$OPTARG;;
                o ) OUTPUT=$OPTARG;;
                v ) VERSION=$OPTARG;;
-               * ) echo "Invalid option passed to '$0' (options:$@)"
+               * ) echo "Invalid option passed to '$0' (options:$*)"
                usage;;
        esac
 done
@@ -55,7 +56,7 @@ if [ -z "${ARCH}" ] || [ -z "${COMPRESS}" ] || [ -z "${LOAD_ADDR}" ] || \
        usage
 fi
 
-ARCH_UPPER=$(echo $ARCH | tr '[:lower:]' '[:upper:]')
+ARCH_UPPER=$(echo "$ARCH" | tr '[:lower:]' '[:upper:]')
 
 # Conditionally create fdt information
 if [ -n "${DTB}" ]; then
@@ -115,4 +116,4 @@ ${FDT_NODE}
 };"
 
 # Write .its file to disk
-echo "$DATA" > ${OUTPUT}
+echo "$DATA" > "${OUTPUT}"