diff --git a/scripts/check-kernel-fix b/scripts/check-kernel-fix index ada93e3..36dd0f7 100755 --- a/scripts/check-kernel-fix +++ b/scripts/check-kernel-fix @@ -32,13 +32,13 @@ usage() echo echo "Parameters:" echo " sha: sha of the upstream commit" - echo " cve: CVE-XXXX-YYYY of the upstream commit (requires VULNS_GIT_PATH)" + echo " cve: CVE-XXXX-YYYY of the upstream commit (requires VULNS_GIT)" echo echo "Options:" echo " -h: help" echo " -q: quiet mode (no progress)" echo " -v: verbose mode: show state of each branch and even NOP actions" - echo " -r: refresh any cached data. (git pull VULNS_GIT_PATH, cve, bsc medata)" + echo " -r: refresh any cached data. (git pull VULNS_GIT, cve, bsc medata)" } branch= @@ -339,7 +339,8 @@ if ! sha_in_upstream "$1" ; then sha=$(cve2sha $1 $refresh) if [ -z "$sha" ] then - fail "Can find't sha in upstream: $1" + [ -z "$VULNS_GIT" ] && fail "VULNS_GIT not defined. It has to point https://git.kernel.org/pub/scm/linux/security/vulns.git tree clone." + fail "Can find't sha in upstream: $1." fi fi diff --git a/scripts/common-functions b/scripts/common-functions index 80642fc..cea7ada 100644 --- a/scripts/common-functions +++ b/scripts/common-functions @@ -68,7 +68,7 @@ cve2sha() { local arg=$1 local REFRESH=$2 - sha="$(cd $VULNS_GIT_PATH; [ -n "$REFRESH" ] && git pull >/dev/null 2>&1; scripts/cve_search $arg 2>/dev/null | cut -d" " -f7)" + sha="$(cd $VULNS_GIT; [ -n "$REFRESH" ] && git pull >/dev/null 2>&1; scripts/cve_search $arg 2>/dev/null | cut -d" " -f7)" if [ $(echo $sha | wc -c) -eq 41 ] then @@ -80,7 +80,7 @@ sha2cve() { local arg=$1 local REFRESH=$2 - cve_sha="$(cd $VULNS_GIT_PATH; [ -n "$REFRESH" ] && git pull >/dev/null 2>&1; scripts/cve_search $arg 2>/dev/null | cut -d" " -f1,7)" + cve_sha="$(cd $VULNS_GIT; [ -n "$REFRESH" ] && git pull >/dev/null 2>&1; scripts/cve_search $arg 2>/dev/null | cut -d" " -f1,7)" if [ $(echo ${cve_sha##* } | wc -c) -eq 41 ] then