refactor: Remove duplicate variable

Some of the scripts had two variables to refer to the program name.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
This commit is contained in:
James O. D. Hunt 2018-04-19 16:00:37 +01:00
parent f3e89d38a9
commit a18753b2ff
2 changed files with 2 additions and 4 deletions

View File

@ -11,7 +11,6 @@ set -e
script_name="${0##*/}" script_name="${0##*/}"
script_dir="$(dirname $(readlink -f $0))" script_dir="$(dirname $(readlink -f $0))"
SCRIPT_NAME="${0##*/}"
IMAGE="${IMAGE:-kata-containers.img}" IMAGE="${IMAGE:-kata-containers.img}"
AGENT_BIN=${AGENT_BIN:-kata-agent} AGENT_BIN=${AGENT_BIN:-kata-agent}
AGENT_INIT=${AGENT_INIT:-no} AGENT_INIT=${AGENT_INIT:-no}
@ -45,7 +44,7 @@ usage()
{ {
error="${1:-0}" error="${1:-0}"
cat <<EOT cat <<EOT
Usage: ${SCRIPT_NAME} [options] <rootfs-dir> Usage: ${script_name} [options] <rootfs-dir>
This script will create a Kata Containers image file of This script will create a Kata Containers image file of
an adequate size based on the <rootfs-dir> directory. an adequate size based on the <rootfs-dir> directory.
The size of the image can be also be specified manually The size of the image can be also be specified manually

View File

@ -11,7 +11,6 @@ set -e
script_name="${0##*/}" script_name="${0##*/}"
script_dir="$(dirname $(readlink -f $0))" script_dir="$(dirname $(readlink -f $0))"
SCRIPT_NAME="${0##*/}"
INITRD_IMAGE="${INITRD_IMAGE:-kata-containers-initrd.img}" INITRD_IMAGE="${INITRD_IMAGE:-kata-containers-initrd.img}"
AGENT_BIN=${AGENT_BIN:-kata-agent} AGENT_BIN=${AGENT_BIN:-kata-agent}
AGENT_INIT=${AGENT_INIT:-no} AGENT_INIT=${AGENT_INIT:-no}
@ -39,7 +38,7 @@ usage()
{ {
error="${1:-0}" error="${1:-0}"
cat <<EOT cat <<EOT
Usage: ${SCRIPT_NAME} [options] <rootfs-dir> Usage: ${script_name} [options] <rootfs-dir>
This script creates a Kata Containers initrd image file based on the This script creates a Kata Containers initrd image file based on the
<rootfs-dir> directory. <rootfs-dir> directory.