aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-01-19 12:27:35 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-01-19 12:27:35 +0100
commit7f31aaaa44c8e45cd72387ea6d1011e28af12a9d (patch)
treedc211959ebafcfa4acb41bc9f493348aa9b99867
parent420875b01bb944146c3c7ba77e754f89a2fc2be1 (diff)
downloadvulns-7f31aaaa44c8e45cd72387ea6d1011e28af12a9d.tar.gz
bippy: handle default command line arguments better
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rwxr-xr-xscripts/bippy6
1 files changed, 2 insertions, 4 deletions
diff --git a/scripts/bippy b/scripts/bippy
index a10d4ef9..4cd4a4a6 100755
--- a/scripts/bippy
+++ b/scripts/bippy
@@ -41,8 +41,6 @@ set -o nounset
# global variables
vuln_kernels=()
-CVE_NUMBER=""
-GIT_SHA=""
help() {
echo "$0 [CVE_NUMBER] [GIT_SHA]"
@@ -50,11 +48,11 @@ help() {
}
# Parse the command line
-CVE_NUMBER=$1
+CVE_NUMBER="${1:-}"
if [[ "${CVE_NUMBER}" == "" ]] ; then
help
fi
-GIT_SHA=$2
+GIT_SHA="${2:-}"
if [[ "${GIT_SHA}" == "" ]] ; then
help
fi