-#!/usr/bin/env bash
+#!/bin/sh
#
# Licensed under the terms of the GNU GPL License version 2 or later.
#
#
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'"
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
usage
fi
-ARCH_UPPER=$(echo $ARCH | tr '[:lower:]' '[:upper:]')
+ARCH_UPPER=$(echo "$ARCH" | tr '[:lower:]' '[:upper:]')
# Conditionally create fdt information
if [ -n "${DTB}" ]; then
};"
# Write .its file to disk
-echo "$DATA" > ${OUTPUT}
+echo "$DATA" > "${OUTPUT}"