diff options
Diffstat (limited to 'scripts/ap.patch.sh')
-rwxr-xr-x | scripts/ap.patch.sh | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/scripts/ap.patch.sh b/scripts/ap.patch.sh index 9ad2c24..19c4bb3 100755 --- a/scripts/ap.patch.sh +++ b/scripts/ap.patch.sh @@ -1,14 +1,11 @@ #!/bin/bash -SCRIPT="${0}" -KMAJOR="${1}" +SCRIPT="$0" +KMAJOR="$1" +DIRVER="$(basename $(pwd) | sed -e 's/linux-//' -e 's/-hardened.*//')" +: ${KMAJOR:=$DIRVER} PATCHSET="/root/hardened-patchset/${KMAJOR}" -if [[ -z "${KMAJOR}" ]] ; then - echo "Usage: ${SCRIPT} <kernel_major>" - exit -fi - if [[ ! -d ${PATCHSET} ]] ; then echo "Patchset ${KMAJOR} doesn't exist" exit |